Skip to content

CSS: heading

.instui-heading — типографика заголовков от -level-h1 до -level-h6.

Пресеты -variant-* переопределяют font-size и font-weight у -level-*, поэтому комбинируйте в элементе только по одному представителю каждого семейства.

Source: heading.css

Доступность

Эти классы задают только визуальный уровень, поэтому отрисуйте реальный <h1><h6> (или используйте role="heading" с aria-level), чтобы передать уровень заголовка.

Использование

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

Примеры

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

Модификаторы

МодификаторОписание
.-border-bottomДобавить нижнюю линию.
.-border-topДобавить верхнюю линию.
.-color-aiЦвет выделения AI.
.-color-primary(по умолчанию) Основной цвет.
.-color-primary-inverseНа тёмном фоне (инверсия основного) цвет.
.-color-secondaryВторичный (приглушённый) цвет.
.-level-h1Отрисовать в масштабе шрифта h1.
.-level-h2Отрисовать в масштабе шрифта h2.
.-level-h3Отрисовать в масштабе шрифта h3.
.-level-h4Отрисовать в масштабе шрифта h4.
.-level-h5Отрисовать в масштабе шрифта h5.
.-level-h6Отрисовать в масштабе шрифта h6.
.-variant-labelПресет типографики метки.
.-variant-title-card-miniПресет мини-заголовка карточки.
.-variant-title-card-regularПресет обычного заголовка карточки.
.-variant-title-card-sectionПресет заголовка секции карточки.
.-variant-title-pageПресет заголовка страницы.
.-variant-title-sectionПресет заголовка раздела.

Использованные токены

TokenТипЗначение
--instui-component-heading-ai-text-bottom-gradient-color<color>LightDarklight-dark(#027887, #3CC0D4)
--instui-component-heading-ai-text-top-gradient-color<color>LightDarklight-dark(#944FB3, #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.5rem
--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.5rem
--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 — Типографика тела для текста, не являющегося заголовком.