variables-typography.css

Same filename and directory in other branches
  1. 11.x core/themes/default_admin/css/_variables/variables-typography.css

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
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /* cspell:ignore blinkmacsystemfont */
  8. /**
  9. * @file
  10. * Typography custom properties — the canonical `--admin-font-*` token API.
  11. *
  12. * The canonical values preserve the rendered type scale from the theme's source
  13. * styles. Body sizes and weights were equivalent and merged directly. Heading
  14. * sizes use whole pixels, while the responsive page-title size remains distinct
  15. * from the generic h1 size. The install and maintenance page h3 size remains an
  16. * inline literal because it is outside the administration scale.
  17. *
  18. * Sizes are authored in px; the build's px-to-rem step converts them.
  19. */
  20. :root {
  21. /* Font families. */
  22. --admin-font-family: inter, "Helvetica Neue", blinkmacsystemfont, -apple-system, "Segoe UI", roboto, oxygen-sans, ubuntu, cantarell, sans-serif;
  23. --admin-font-family-serif: "Times New Roman", times, serif;
  24. /* Line heights. (Unitless ratios are not lengths; -label is a fixed 18px.) */
  25. --admin-line-height: 1.5;
  26. --admin-line-height-heading: 1.3;
  27. --admin-line-height-label: 1.125rem;
  28. /*
  29. * Font sizes — body scale (2xs…2xl), element-mapped heading scale (h1…h6), plus
  30. * the page-title and quote sizes.
  31. */
  32. --admin-font-size-2xs: 0.75rem;
  33. --admin-font-size-xs: 0.8125rem;
  34. --admin-font-size-s: 0.875rem;
  35. --admin-font-size-m: 1rem; /* base */
  36. --admin-font-size-l: 1.125rem;
  37. --admin-font-size-xl: 1.25rem;
  38. --admin-font-size-2xl: 2.25rem; /* display (install/maintenance site name) */
  39. --admin-font-size-label: var(--admin-font-size-s);
  40. --admin-font-size-h1: 2rem;
  41. --admin-font-size-h2: 1.75rem;
  42. --admin-font-size-h3: 1.5rem;
  43. --admin-font-size-h4: 1.4375rem;
  44. --admin-font-size-h5: 1.25rem;
  45. --admin-font-size-h6: var(--admin-font-size-l);
  46. /* Page title - distinct from the generic h1 above. */
  47. --admin-font-size-page-title: 1.625rem;
  48. --admin-font-size-quote: 1.1em;
  49. /* Font weights (values tuned for Inter). */
  50. --admin-font-weight-normal: 400;
  51. --admin-font-weight-semibold: 525;
  52. --admin-font-weight-bold: 575;
  53. --admin-font-weight-heavy: 625;
  54. @media (min-width: 61em) {
  55. --admin-font-size-page-title: 1.8125rem;
  56. --admin-font-size-quote: 1.2em;
  57. }
  58. @media (min-width: 90em) {
  59. --admin-font-size-page-title: 2.125rem;
  60. }
  61. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.