/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/ui/src/text/style.module.css
120 строк
5 KB
Marco Ciampini
DS: Name font weight tokens by intent (#80093)
13 июл 2026, 22:20
Не верифицирован
13 июл 2026, 22:20
0cf7ede
Код
Авторство
О чём код?
@layer wp-ui { @layer utilities, components, compositions, overrides; @layer components { .text { margin: 0; } /* Text variants can render as either paragraphs or headings, so each variant provides values for both element-specific CSS defenses. */ .heading-2xl { --_gcd-heading-font-size: var(--wpds-typography-font-size-2xl); --_gcd-heading-font-weight: var(--wpds-typography-font-weight-emphasis); --_gcd-p-font-size: var(--wpds-typography-font-size-2xl); --_gcd-p-line-height: var(--wpds-typography-line-height-2xl); font-family: var(--wpds-typography-font-family-heading); font-size: var(--wpds-typography-font-size-2xl); line-height: var(--wpds-typography-line-height-2xl); font-weight: var(--wpds-typography-font-weight-emphasis); } .heading-xl { --_gcd-heading-font-size: var(--wpds-typography-font-size-xl); --_gcd-heading-font-weight: var(--wpds-typography-font-weight-emphasis); --_gcd-p-font-size: var(--wpds-typography-font-size-xl); --_gcd-p-line-height: var(--wpds-typography-line-height-md); font-family: var(--wpds-typography-font-family-heading); font-size: var(--wpds-typography-font-size-xl); line-height: var(--wpds-typography-line-height-md); font-weight: var(--wpds-typography-font-weight-emphasis); } .heading-lg { --_gcd-heading-font-size: var(--wpds-typography-font-size-lg); --_gcd-heading-font-weight: var(--wpds-typography-font-weight-emphasis); --_gcd-p-font-size: var(--wpds-typography-font-size-lg); --_gcd-p-line-height: var(--wpds-typography-line-height-sm); font-family: var(--wpds-typography-font-family-heading); font-size: var(--wpds-typography-font-size-lg); line-height: var(--wpds-typography-line-height-sm); font-weight: var(--wpds-typography-font-weight-emphasis); } .heading-md { --_gcd-heading-font-size: var(--wpds-typography-font-size-md); --_gcd-heading-font-weight: var(--wpds-typography-font-weight-emphasis); --_gcd-p-font-size: var(--wpds-typography-font-size-md); --_gcd-p-line-height: var(--wpds-typography-line-height-sm); font-family: var(--wpds-typography-font-family-heading); font-size: var(--wpds-typography-font-size-md); line-height: var(--wpds-typography-line-height-sm); font-weight: var(--wpds-typography-font-weight-emphasis); } .heading-sm { --_gcd-heading-font-size: var(--wpds-typography-font-size-xs); --_gcd-heading-font-weight: var(--wpds-typography-font-weight-emphasis); --_gcd-p-font-size: var(--wpds-typography-font-size-xs); --_gcd-p-line-height: var(--wpds-typography-line-height-xs); font-family: var(--wpds-typography-font-family-heading); font-size: var(--wpds-typography-font-size-xs); line-height: var(--wpds-typography-line-height-xs); font-weight: var(--wpds-typography-font-weight-emphasis); text-transform: uppercase; } .body-xl { --_gcd-heading-font-size: var(--wpds-typography-font-size-xl); --_gcd-heading-font-weight: var(--wpds-typography-font-weight-default); --_gcd-p-font-size: var(--wpds-typography-font-size-xl); --_gcd-p-line-height: var(--wpds-typography-line-height-xl); font-family: var(--wpds-typography-font-family-body); font-size: var(--wpds-typography-font-size-xl); line-height: var(--wpds-typography-line-height-xl); font-weight: var(--wpds-typography-font-weight-default); } .body-lg { --_gcd-heading-font-size: var(--wpds-typography-font-size-lg); --_gcd-heading-font-weight: var(--wpds-typography-font-weight-default); --_gcd-p-font-size: var(--wpds-typography-font-size-lg); --_gcd-p-line-height: var(--wpds-typography-line-height-md); font-family: var(--wpds-typography-font-family-body); font-size: var(--wpds-typography-font-size-lg); line-height: var(--wpds-typography-line-height-md); font-weight: var(--wpds-typography-font-weight-default); } .body-md { --_gcd-heading-font-size: var(--wpds-typography-font-size-md); --_gcd-heading-font-weight: var(--wpds-typography-font-weight-default); --_gcd-p-font-size: var(--wpds-typography-font-size-md); --_gcd-p-line-height: var(--wpds-typography-line-height-sm); font-family: var(--wpds-typography-font-family-body); font-size: var(--wpds-typography-font-size-md); line-height: var(--wpds-typography-line-height-sm); font-weight: var(--wpds-typography-font-weight-default); } .body-sm { --_gcd-heading-font-size: var(--wpds-typography-font-size-sm); --_gcd-heading-font-weight: var(--wpds-typography-font-weight-default); --_gcd-p-font-size: var(--wpds-typography-font-size-sm); --_gcd-p-line-height: var(--wpds-typography-line-height-xs); font-family: var(--wpds-typography-font-family-body); font-size: var(--wpds-typography-font-size-sm); line-height: var(--wpds-typography-line-height-xs); font-weight: var(--wpds-typography-font-weight-default); } } }