Skip to content

CSS: heading ​

.instui-heading — Heading typography from -level-h1 to -level-h6.

The -variant-* presets override a -level-*'s font-size and font-weight, so combine only one of each family per element.

Source: heading.css

Usage ​

css
@import "@pantoken/components/components.css";
@import "@pantoken/components/heading.css";

Examples ​

html
<div class="instui-heading -level-h1">Heading h1</div>

Modifiers ​

ModifierDescription
.-border-bottomAdd a bottom rule.
.-border-topAdd a top rule.
.-color-aiAI-accent colour.
.-color-primary(default) Primary colour.
.-color-primary-inverseOn-dark (primary inverse) colour.
.-color-secondarySecondary (muted) colour.
.-level-h1Render at the h1 type scale.
.-level-h2Render at the h2 type scale.
.-level-h3Render at the h3 type scale.
.-level-h4Render at the h4 type scale.
.-level-h5Render at the h5 type scale.
.-level-h6Render at the h6 type scale.
.-variant-labelLabel type preset.
.-variant-title-card-miniMini card-title preset.
.-variant-title-card-regularRegular card-title preset.
.-variant-title-card-sectionCard section-title preset.
.-variant-title-pagePage-title preset.
.-variant-title-sectionSection-title preset.

Conditions ​

TypeQueryDescription
media(forced-colors: active)—

Accessibility ​

These classes set the visual level only, so render a real <h1>–<h6> (or use role="heading" with aria-level) to convey the heading level.

Rules (axe-core)Rebrand (light)Rebrand (dark)CanvasCanvas High Contrast
color-contrastWCAG 2.2 1.4.3Review neededReview neededReview neededReview needed

Elements must meet minimum color contrast ratio thresholds

  • .-color-ai
ConditionsRebrand (light)Rebrand (dark)CanvasCanvas High Contrast
more-contrast-respectedWCAG 2.2 1.4.3, 1.4.6Review neededReview neededReview neededReview needed

All 17 measured pieces of text pass with more contrast. one other piece can't be reduced to one color. "Suggested study plan" can't be measured because a background image or gradient sits behind it.

reflow-at-320pxWCAG 2.2 1.4.10PassPassPassPass
text-spacing-no-clippingWCAG 2.2 1.4.12PassPassPassPass
Screen reader (simulated)Rebrand (light)Rebrand (dark)CanvasCanvas High Contrast
AnnouncementsPassPassPassPass

These automated results do not establish that the page meets WCAG; manual review is still needed.

Tokens consumed ​

TokenTypeValue
--instui-component-heading-ai-text-bottom-gradient-color<color>LightDarklight-dark(#02717E, #3CC0D4)
--instui-component-heading-ai-text-top-gradient-color<color>LightDarklight-dark(#8A49A7, #CAA1D9)
--instui-component-heading-base-color<color>LightDarklight-dark(#273540, #ffffff)
--instui-component-heading-border-color<color>LightDarklight-dark(#8D959F, #6A7883)
--instui-component-heading-border-padding<length>0.125rem
--instui-component-heading-border-width<length>0.0625rem
--instui-component-heading-h1-font-family[ <font-family-name> | <generic-font-family> ]#Inclusive Sans, "Helvetica Neue", Helvetica, Arial, sans-serif
--instui-component-heading-h1-font-size<length>2.25rem
--instui-component-heading-h1-font-weight<integer>700
--instui-component-heading-h2-font-size<length>1.75rem
--instui-component-heading-h2-font-weight<integer>600
--instui-component-heading-h3-font-size<length>1.25rem
--instui-component-heading-h3-font-weight<integer>700
--instui-component-heading-h4-font-size<length>1rem
--instui-component-heading-h4-font-weight<integer>700
--instui-component-heading-h5-font-size<length>0.875rem
--instui-component-heading-h5-font-weight<integer>600
--instui-component-heading-h6-font-size<length>0.75rem
--instui-component-heading-h6-font-weight<integer>600
--instui-component-heading-inverse-color<color>LightDarklight-dark(#ffffff, #1C222B)
--instui-component-heading-label-font-size<length>1rem
--instui-component-heading-label-font-weight<integer>700
--instui-component-heading-line-height<percentage>125%
--instui-component-heading-muted-color<color>LightDarklight-dark(#576773, #AAB0B5)
--instui-component-heading-title-card-mini-font-size<length>1rem
--instui-component-heading-title-card-mini-font-weight<integer>700
--instui-component-heading-title-card-regular-font-size<length>1.25rem
--instui-component-heading-title-card-regular-font-weight<integer>700
--instui-component-heading-title-card-section-font-size<length>1.75rem
--instui-component-heading-title-card-section-font-weight<integer>700
--instui-component-heading-title-page-desktop-font-size<length>2.25rem
--instui-component-heading-title-page-desktop-font-weight<integer>700
--instui-component-heading-title-section-font-size<length>1.75rem
--instui-component-heading-title-section-font-weight<integer>700
  • text — Body typography for non-heading text.