variables-typography.pcss.css

Same filename and directory in other branches
  1. 11.x core/themes/default_admin/css/_variables/variables-typography.pcss.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.pcss.css

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

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