_variables.scss 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. @use 'sass:color';
  2. // paths
  3. // We can't use absolute paths here, because those are dependent on Django's
  4. // STATIC_URL setting. Instead, relative paths from the final location of the
  5. // compiled CSS files are used.
  6. // */
  7. $images-root: '../images/';
  8. // grid settings
  9. $grid-columns: 12;
  10. $grid-gutter-width: 3%;
  11. $grid-max-width: 1200px;
  12. $grid-content-indent: 0.7;
  13. $mobile-nice-padding: 20px;
  14. $desktop-nice-padding: 50px;
  15. // screen breakpoints
  16. $breakpoints: (
  17. xs: 0,
  18. sm: 50em,
  19. // 800px
  20. md: 56.25em,
  21. // 900px
  22. lg: 75em,
  23. // 1200px
  24. xl: 100em,
  25. // 1440px
  26. );
  27. // colours
  28. $color-teal-light: var(--color-primary-light);
  29. $color-teal-lighter: var(--color-primary-lighter);
  30. $color-teal: var(--color-primary);
  31. $color-teal-darker: var(--color-primary-darker);
  32. $color-teal-dark: var(--color-primary-dark);
  33. $color-blue: #71b2d4;
  34. $color-red: #cd3238;
  35. $color-red-dark: #b4191f;
  36. $color-orange: #e9b04d;
  37. $color-orange-dark: #bb5b03;
  38. $color-green: #189370;
  39. $color-green-dark: #157b57;
  40. $color-green-darker: #105d42; // White has AAA compatibility when this is used in bgd.
  41. $color-salmon: #f37e77;
  42. $color-salmon-light: #fcf2f2;
  43. $color-white: #fff;
  44. $color-black: #000;
  45. // darker to lighter
  46. $color-grey-1: color.adjust($color-white, $lightness: -80%);
  47. $color-grey-2: color.adjust($color-white, $lightness: -70%);
  48. $color-grey-3: color.adjust($color-white, $lightness: -15%);
  49. $color-grey-4: color.adjust($color-white, $lightness: -10%);
  50. $color-grey-5: color.adjust($color-white, $lightness: -2%);
  51. $color-menu-text: color.adjust($color-white, $lightness: -20%);
  52. $color-thead-bg: $color-grey-5;
  53. $color-header-bg: $color-teal;
  54. $color-fieldset-hover: $color-grey-5;
  55. $color-input-border: $color-grey-4;
  56. $color-input-focus: var(--color-input-focus);
  57. $color-input-focus-border: var(--color-input-focus-border);
  58. $color-input-error-bg: color.adjust(
  59. color.adjust($color-red, $saturation: 28%),
  60. $lightness: 45%
  61. );
  62. $color-button: $color-teal;
  63. $color-button-hover: $color-teal-darker;
  64. $color-button-yes: $color-green-dark;
  65. $color-button-yes-hover: color.adjust($color-button-yes, $lightness: -8%);
  66. $color-button-no: $color-red-dark;
  67. $color-button-no-hover: color.adjust($color-button-no, $lightness: -20%);
  68. $color-button-warning: $color-orange-dark;
  69. $color-button-warning-hover: color.adjust(
  70. $color-button-warning,
  71. $lightness: -20%
  72. );
  73. $color-link: $color-teal-darker;
  74. $color-link-hover: $color-teal-dark;
  75. // The focus outline color is defined without reusing a named color variable
  76. // because it shouldn’t be reused for anything else in the UI.
  77. $color-focus-outline: #ffbf47;
  78. $color-text-base: color.adjust($color-white, $lightness: -85%);
  79. $color-text-input: color.adjust($color-white, $lightness: -90%);
  80. // System Colors
  81. $media-forced-colours: active;
  82. $system-color-link-text: LinkText;
  83. $system-color-button-text: ButtonText;
  84. // Fonts
  85. // Our fonts are based off of a list of system fallbacks to ensure
  86. // that the most 'up-to-date' and available system font is used and rendered consistently as possible across browsers.
  87. $font-sans:
  88. // iOS Safari, macOS Safari, macOS Firefox
  89. -apple-system,
  90. // macOS Chrome
  91. BlinkMacSystemFont,
  92. // Windows - for all browsers on Windows 7+ (putting Segoe UI before system-ui ensures Segoe UI will be rendered for different languages)
  93. 'Segoe UI',
  94. system-ui,
  95. // Targets Android and newer Chrome OS'. (If Roboto is installed on your windows computer Segoe UI will take precedence.)
  96. Roboto,
  97. // A common fallback font for older macOS'
  98. 'Helvetica Neue',
  99. // Very old Windows versions (special shout-out to whoever is using windows 95)
  100. Arial,
  101. // A last resort if all else fails, just give us something without serifs :)
  102. sans-serif,
  103. // All the emojis 👋🙂
  104. 'Apple Color Emoji',
  105. 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  106. // Legacy icon font, to be removed in the near future.
  107. $font-wagtail-icons: wagtail;
  108. // misc sizing
  109. $thumbnail-width: 130px;
  110. $menu-width: 200px;
  111. $menu-width-slim: 65px;
  112. $menu-width-max: 320px;
  113. $mobile-nav-indent: 50px;
  114. $sidebar-toggle-spacing: 12px;
  115. $sidebar-toggle-size: 35px;
  116. // transitions
  117. // Please keep in sync with SIDEBAR_TRANSITION_DURATION variable in `client/src/components/Sidebar/Sidebar.tsx`
  118. $menu-transition-duration: 150ms;
  119. $focus-outline-width: 3px;
  120. $nav-wrapper-inner-z-index: 26;
  121. $draftail-editor-z-index: $nav-wrapper-inner-z-index + 1;
  122. $object-title-height: 40px;
  123. // Nav
  124. $nav-grey-1: color.adjust($color-white, $lightness: -80%);
  125. $nav-grey-2: color.adjust($color-white, $lightness: -60%);
  126. $nav-grey-3: #262626;
  127. $nav-item-hover-bg: rgba(100, 100, 100, 0.15);
  128. $nav-item-active-bg: color.adjust($color-white, $lightness: -90%);
  129. $nav-submenu-bg: color.adjust($color-white, $lightness: -85%);
  130. $nav-footer-account-bg: $nav-item-active-bg;
  131. $nav-footer-submenu-bg: $nav-submenu-bg;
  132. $nav-footer-closed-height: 50px;
  133. $nav-footer-submenu-height: 85px;
  134. $nav-footer-open-height: $nav-footer-closed-height + $nav-footer-submenu-height;
  135. // Nav search
  136. $nav-search-color: color.adjust($color-white, $lightness: -20%);
  137. $nav-search-border: color.adjust($color-white, $lightness: -40%);
  138. $nav-search-bg: $nav-grey-1;
  139. $nav-search-hover-bg: $nav-item-hover-bg;
  140. $nav-search-focus-color: $color-white;
  141. $nav-search-focus-bg: $nav-item-hover-bg;
  142. // Form Errors
  143. $color-text-error: color.change($color-red, $saturation: 69%, $lightness: 52%);
  144. $color-text-error-forced-color: color.change(
  145. $color-red,
  146. $saturation: 100%,
  147. $lightness: 50%
  148. );
  149. $color-text-warning-forced-color: color.change(
  150. $color-orange,
  151. $saturation: 100%,
  152. $lightness: 70%
  153. );