variables-typography.css
Same filename and directory in other branches
Typography custom properties — the canonical `--admin-font-*` token API.
The canonical values preserve the rendered type scale from the theme's source styles. Body sizes and weights were equivalent and merged directly. Heading sizes use whole pixels, while the responsive page-title size remains distinct from the generic h1 size. The install and maintenance page h3 size remains an inline literal because it is outside the administration scale.
Sizes are authored in px; the build's px-to-rem step converts them.
File
-
core/
themes/ default_admin/ css/ _variables/ variables-typography.css
View source
- /*
- * DO NOT EDIT THIS FILE.
- * See the following change record for more information,
- * https://www.drupal.org/node/3084859
- * @preserve
- */
-
- /* cspell:ignore blinkmacsystemfont */
-
- /**
- * @file
- * Typography custom properties — the canonical `--admin-font-*` token API.
- *
- * The canonical values preserve the rendered type scale from the theme's source
- * styles. Body sizes and weights were equivalent and merged directly. Heading
- * sizes use whole pixels, while the responsive page-title size remains distinct
- * from the generic h1 size. The install and maintenance page h3 size remains an
- * inline literal because it is outside the administration scale.
- *
- * Sizes are authored in px; the build's px-to-rem step converts them.
- */
- :root {
- /* Font families. */
- --admin-font-family: inter, "Helvetica Neue", blinkmacsystemfont, -apple-system, "Segoe UI", roboto, oxygen-sans, ubuntu, cantarell, sans-serif;
- --admin-font-family-serif: "Times New Roman", times, serif;
-
- /* Line heights. (Unitless ratios are not lengths; -label is a fixed 18px.) */
- --admin-line-height: 1.5;
- --admin-line-height-heading: 1.3;
- --admin-line-height-label: 1.125rem;
-
- /*
- * Font sizes — body scale (2xs…2xl), element-mapped heading scale (h1…h6), plus
- * the page-title and quote sizes.
- */
- --admin-font-size-2xs: 0.75rem;
- --admin-font-size-xs: 0.8125rem;
- --admin-font-size-s: 0.875rem;
- --admin-font-size-m: 1rem; /* base */
- --admin-font-size-l: 1.125rem;
- --admin-font-size-xl: 1.25rem;
- --admin-font-size-2xl: 2.25rem; /* display (install/maintenance site name) */
- --admin-font-size-label: var(--admin-font-size-s);
- --admin-font-size-h1: 2rem;
- --admin-font-size-h2: 1.75rem;
- --admin-font-size-h3: 1.5rem;
- --admin-font-size-h4: 1.4375rem;
- --admin-font-size-h5: 1.25rem;
- --admin-font-size-h6: var(--admin-font-size-l);
-
- /* Page title - distinct from the generic h1 above. */
- --admin-font-size-page-title: 1.625rem;
- --admin-font-size-quote: 1.1em;
-
- /* Font weights (values tuned for Inter). */
- --admin-font-weight-normal: 400;
- --admin-font-weight-semibold: 525;
- --admin-font-weight-bold: 575;
- --admin-font-weight-heavy: 625;
-
- @media (min-width: 61em) {
- --admin-font-size-page-title: 1.8125rem;
- --admin-font-size-quote: 1.2em;
- }
-
- @media (min-width: 90em) {
- --admin-font-size-page-title: 2.125rem;
- }
- }
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.