@graupl/core 1.0.0-beta.22 → 1.0.0-beta.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/dist/css/base/button.css +2 -2
  2. package/dist/css/base/button.css.map +1 -1
  3. package/dist/css/base/form.css +2 -2
  4. package/dist/css/base/form.css.map +1 -1
  5. package/dist/css/base/link.css +2 -2
  6. package/dist/css/base/link.css.map +1 -1
  7. package/dist/css/base/table.css +2 -2
  8. package/dist/css/base/table.css.map +1 -1
  9. package/dist/css/base.css +2 -2
  10. package/dist/css/base.css.map +1 -1
  11. package/dist/css/component/accordion.css +2 -5
  12. package/dist/css/component/accordion.css.map +1 -1
  13. package/dist/css/component/alert.css +2 -2
  14. package/dist/css/component/alert.css.map +1 -1
  15. package/dist/css/component/badge.css +2 -2
  16. package/dist/css/component/badge.css.map +1 -1
  17. package/dist/css/component/card.css +2 -2
  18. package/dist/css/component/card.css.map +1 -1
  19. package/dist/css/component/carousel.css +2 -2
  20. package/dist/css/component/carousel.css.map +1 -1
  21. package/dist/css/component/disclosure.css +2 -2
  22. package/dist/css/component/disclosure.css.map +1 -1
  23. package/dist/css/component/input-group.css +2 -2
  24. package/dist/css/component/input-group.css.map +1 -1
  25. package/dist/css/component/list.css +2 -2
  26. package/dist/css/component/list.css.map +1 -1
  27. package/dist/css/component/menu.css +2 -2
  28. package/dist/css/component/menu.css.map +1 -1
  29. package/dist/css/component/navigation.css +2 -2
  30. package/dist/css/component/navigation.css.map +1 -1
  31. package/dist/css/component.css +2 -5
  32. package/dist/css/component.css.map +1 -1
  33. package/dist/css/graupl.css +2 -5
  34. package/dist/css/graupl.css.map +1 -1
  35. package/dist/css/init.css +2 -2
  36. package/dist/css/init.css.map +1 -1
  37. package/dist/css/layout/columns.css +2 -2
  38. package/dist/css/layout/columns.css.map +1 -1
  39. package/dist/css/layout/container.css +2 -2
  40. package/dist/css/layout/container.css.map +1 -1
  41. package/dist/css/layout/flex-columns.css +2 -2
  42. package/dist/css/layout/flex-columns.css.map +1 -1
  43. package/dist/css/layout.css +2 -5
  44. package/dist/css/layout.css.map +1 -1
  45. package/dist/css/normalize.css +2 -2
  46. package/dist/css/normalize.css.map +1 -1
  47. package/dist/css/state/focus.css +2 -2
  48. package/dist/css/state/focus.css.map +1 -1
  49. package/dist/css/state.css +2 -2
  50. package/dist/css/state.css.map +1 -1
  51. package/dist/css/theme/color.css +2 -2
  52. package/dist/css/theme/color.css.map +1 -1
  53. package/dist/css/theme/typography.css +2 -2
  54. package/dist/css/theme/typography.css.map +1 -1
  55. package/dist/css/theme.css +2 -2
  56. package/dist/css/theme.css.map +1 -1
  57. package/dist/css/utilities/alignment.css +1 -1
  58. package/dist/css/utilities/alignment.css.map +1 -1
  59. package/dist/css/utilities/background.css +2 -2
  60. package/dist/css/utilities/background.css.map +1 -1
  61. package/dist/css/utilities/border.css +2 -2
  62. package/dist/css/utilities/border.css.map +1 -1
  63. package/dist/css/utilities/color.css +2 -2
  64. package/dist/css/utilities/color.css.map +1 -1
  65. package/dist/css/utilities/container.css +1 -1
  66. package/dist/css/utilities/container.css.map +1 -1
  67. package/dist/css/utilities/display.css +2 -2
  68. package/dist/css/utilities/display.css.map +1 -1
  69. package/dist/css/utilities/flex.css +2 -2
  70. package/dist/css/utilities/flex.css.map +1 -1
  71. package/dist/css/utilities/gradient.css +2 -2
  72. package/dist/css/utilities/gradient.css.map +1 -1
  73. package/dist/css/utilities/height.css +2 -2
  74. package/dist/css/utilities/height.css.map +1 -1
  75. package/dist/css/utilities/inset.css +2 -2
  76. package/dist/css/utilities/inset.css.map +1 -1
  77. package/dist/css/utilities/justification.css +1 -1
  78. package/dist/css/utilities/justification.css.map +1 -1
  79. package/dist/css/utilities/list.css +1 -1
  80. package/dist/css/utilities/list.css.map +1 -1
  81. package/dist/css/utilities/order.css +2 -2
  82. package/dist/css/utilities/order.css.map +1 -1
  83. package/dist/css/utilities/position.css +2 -2
  84. package/dist/css/utilities/position.css.map +1 -1
  85. package/dist/css/utilities/ratio.css +2 -2
  86. package/dist/css/utilities/ratio.css.map +1 -1
  87. package/dist/css/utilities/spacing.css +2 -2
  88. package/dist/css/utilities/spacing.css.map +1 -1
  89. package/dist/css/utilities/typography.css +2 -2
  90. package/dist/css/utilities/typography.css.map +1 -1
  91. package/dist/css/utilities/visibility.css +2 -2
  92. package/dist/css/utilities/visibility.css.map +1 -1
  93. package/dist/css/utilities/visually-hidden.css +2 -2
  94. package/dist/css/utilities/visually-hidden.css.map +1 -1
  95. package/dist/css/utilities/width.css +2 -2
  96. package/dist/css/utilities/width.css.map +1 -1
  97. package/dist/css/utilities/z-index.css +1 -1
  98. package/dist/css/utilities/z-index.css.map +1 -1
  99. package/dist/css/utilities.css +2 -2
  100. package/dist/css/utilities.css.map +1 -1
  101. package/dist/js/accordion.js.map +1 -1
  102. package/dist/js/alert.js.map +1 -1
  103. package/dist/js/carousel.js.map +1 -1
  104. package/dist/js/component/accordion.cjs.js.map +1 -1
  105. package/dist/js/component/accordion.es.js.map +1 -1
  106. package/dist/js/component/accordion.iife.js.map +1 -1
  107. package/dist/js/component/alert.cjs.js.map +1 -1
  108. package/dist/js/component/alert.es.js.map +1 -1
  109. package/dist/js/component/alert.iife.js.map +1 -1
  110. package/dist/js/component/carousel.cjs.js.map +1 -1
  111. package/dist/js/component/carousel.es.js.map +1 -1
  112. package/dist/js/component/carousel.iife.js.map +1 -1
  113. package/dist/js/component/disclosure.cjs.js +2 -2
  114. package/dist/js/component/disclosure.cjs.js.map +1 -1
  115. package/dist/js/component/disclosure.es.js +2 -2
  116. package/dist/js/component/disclosure.es.js.map +1 -1
  117. package/dist/js/component/disclosure.iife.js +2 -2
  118. package/dist/js/component/disclosure.iife.js.map +1 -1
  119. package/dist/js/component/tabs.cjs.js +5 -0
  120. package/dist/js/component/tabs.cjs.js.map +1 -0
  121. package/dist/js/component/tabs.es.js +5 -0
  122. package/dist/js/component/tabs.es.js.map +1 -0
  123. package/dist/js/component/tabs.iife.js +5 -0
  124. package/dist/js/component/tabs.iife.js.map +1 -0
  125. package/dist/js/disclosure.js +2 -2
  126. package/dist/js/disclosure.js.map +1 -1
  127. package/dist/js/generator/accordion.cjs.js.map +1 -1
  128. package/dist/js/generator/accordion.es.js.map +1 -1
  129. package/dist/js/generator/accordion.iife.js.map +1 -1
  130. package/dist/js/generator/alert.cjs.js.map +1 -1
  131. package/dist/js/generator/alert.es.js.map +1 -1
  132. package/dist/js/generator/alert.iife.js.map +1 -1
  133. package/dist/js/generator/carousel.cjs.js.map +1 -1
  134. package/dist/js/generator/carousel.es.js.map +1 -1
  135. package/dist/js/generator/carousel.iife.js.map +1 -1
  136. package/dist/js/generator/disclosure.cjs.js +2 -2
  137. package/dist/js/generator/disclosure.cjs.js.map +1 -1
  138. package/dist/js/generator/disclosure.es.js +2 -2
  139. package/dist/js/generator/disclosure.es.js.map +1 -1
  140. package/dist/js/generator/disclosure.iife.js +2 -2
  141. package/dist/js/generator/disclosure.iife.js.map +1 -1
  142. package/dist/js/generator/navigation.cjs.js.map +1 -1
  143. package/dist/js/generator/navigation.es.js.map +1 -1
  144. package/dist/js/generator/navigation.iife.js.map +1 -1
  145. package/dist/js/generator/tabs.cjs.js +5 -0
  146. package/dist/js/generator/tabs.cjs.js.map +1 -0
  147. package/dist/js/generator/tabs.es.js +5 -0
  148. package/dist/js/generator/tabs.es.js.map +1 -0
  149. package/dist/js/generator/tabs.iife.js +5 -0
  150. package/dist/js/generator/tabs.iife.js.map +1 -0
  151. package/dist/js/graupl.js +5 -5
  152. package/dist/js/graupl.js.map +1 -1
  153. package/dist/js/navigation.js.map +1 -1
  154. package/dist/js/tabs.js +5 -0
  155. package/dist/js/tabs.js.map +1 -0
  156. package/package.json +4 -3
  157. package/src/js/disclosure/Disclosure.js +25 -45
  158. package/src/js/domHelpers.js +39 -22
  159. package/src/js/tabs/TabToggle.js +378 -0
  160. package/src/js/tabs/Tabs.js +1091 -0
  161. package/src/js/tabs/generator.js +32 -0
  162. package/src/js/tabs/index.js +5 -0
  163. package/src/scss/_defaults.scss +21 -88
  164. package/src/scss/_variables.scss +70 -0
  165. package/src/scss/base/button/_defaults.scss +2 -24
  166. package/src/scss/base/button/_index.scss +53 -52
  167. package/src/scss/base/button/_mixins.scss +24 -58
  168. package/src/scss/base/button/_variables.scss +139 -0
  169. package/src/scss/base/form/_defaults.scss +72 -2
  170. package/src/scss/base/form/_index.scss +196 -70
  171. package/src/scss/base/form/_variables.scss +166 -0
  172. package/src/scss/base/link/_defaults.scss +31 -0
  173. package/src/scss/base/link/_index.scss +177 -172
  174. package/src/scss/base/link/_variables.scss +215 -0
  175. package/src/scss/base/table/_defaults.scss +1 -11
  176. package/src/scss/base/table/_index.scss +126 -117
  177. package/src/scss/base/table/_variables.scss +214 -3
  178. package/src/scss/component/_index.scss +1 -0
  179. package/src/scss/component/accordion/_defaults.scss +73 -22
  180. package/src/scss/component/accordion/_index.scss +437 -62
  181. package/src/scss/component/accordion/_variables.scss +527 -101
  182. package/src/scss/component/alert/_defaults.scss +23 -32
  183. package/src/scss/component/alert/_index.scss +236 -30
  184. package/src/scss/component/alert/_variables.scss +155 -6
  185. package/src/scss/component/badge/_defaults.scss +1 -0
  186. package/src/scss/component/badge/_index.scss +25 -28
  187. package/src/scss/component/badge/_variables.scss +66 -2
  188. package/src/scss/component/card/_defaults.scss +64 -13
  189. package/src/scss/component/card/_index.scss +276 -30
  190. package/src/scss/component/card/_variables.scss +132 -0
  191. package/src/scss/component/carousel/_defaults.scss +73 -15
  192. package/src/scss/component/carousel/_index.scss +357 -41
  193. package/src/scss/component/carousel/_variables.scss +391 -0
  194. package/src/scss/component/disclosure/_index.scss +4 -4
  195. package/src/scss/component/disclosure/_variables.scss +127 -2
  196. package/src/scss/component/input-group/_defaults.scss +10 -3
  197. package/src/scss/component/input-group/_index.scss +72 -4
  198. package/src/scss/component/input-group/_variables.scss +37 -0
  199. package/src/scss/component/list/_defaults.scss +35 -2
  200. package/src/scss/component/list/_index.scss +159 -5
  201. package/src/scss/component/list/_variables.scss +152 -0
  202. package/src/scss/component/menu/_defaults.scss +49 -7
  203. package/src/scss/component/menu/_index.scss +325 -99
  204. package/src/scss/component/menu/_variables.scss +484 -1
  205. package/src/scss/component/navigation/_defaults.scss +45 -3
  206. package/src/scss/component/navigation/_index.scss +249 -98
  207. package/src/scss/component/navigation/_variables.scss +334 -5
  208. package/src/scss/component/tabs/_defaults.scss +82 -0
  209. package/src/scss/component/tabs/_index.scss +497 -0
  210. package/src/scss/component/tabs/_variables.scss +974 -0
  211. package/src/scss/layout/columns/_defaults.scss +5 -3
  212. package/src/scss/layout/columns/_index.scss +27 -21
  213. package/src/scss/layout/columns/_variables.scss +13 -0
  214. package/src/scss/layout/container/_defaults.scss +28 -11
  215. package/src/scss/layout/container/_index.scss +305 -161
  216. package/src/scss/layout/container/_variables.scss +148 -15
  217. package/src/scss/layout/flex-columns/_defaults.scss +5 -3
  218. package/src/scss/layout/flex-columns/_index.scss +28 -20
  219. package/src/scss/layout/flex-columns/_variables.scss +9 -0
  220. package/src/scss/mixins/_state.scss +37 -0
  221. package/src/scss/mixins/_theme.scss +36 -1
  222. package/src/scss/state/focus/_index.scss +17 -12
  223. package/src/scss/state/focus/_variables.scss +30 -4
  224. package/src/scss/theme/color/_defaults.scss +6 -35
  225. package/src/scss/theme/color/_index.scss +167 -1
  226. package/src/scss/theme/color/_variables.scss +155 -0
  227. package/src/scss/theme/typography/_defaults.scss +26 -19
  228. package/src/scss/theme/typography/_index.scss +176 -20
  229. package/src/scss/theme/typography/_variables.scss +186 -0
  230. package/src/scss/utilities/_template/_index.scss +0 -1
  231. package/src/scss/utilities/alignment/_defaults.scss +0 -33
  232. package/src/scss/utilities/alignment/_index.scss +24 -25
  233. package/src/scss/utilities/background/_defaults.scss +0 -77
  234. package/src/scss/utilities/background/_index.scss +32 -37
  235. package/src/scss/utilities/border/_defaults.scss +0 -33
  236. package/src/scss/utilities/border/_index.scss +25 -26
  237. package/src/scss/utilities/color/_defaults.scss +0 -19
  238. package/src/scss/utilities/color/_index.scss +22 -22
  239. package/src/scss/utilities/container/_defaults.scss +0 -11
  240. package/src/scss/utilities/container/_index.scss +20 -19
  241. package/src/scss/utilities/display/_defaults.scss +0 -11
  242. package/src/scss/utilities/display/_index.scss +20 -19
  243. package/src/scss/utilities/flex/_defaults.scss +0 -55
  244. package/src/scss/utilities/flex/_index.scss +28 -31
  245. package/src/scss/utilities/gradient/_defaults.scss +0 -28
  246. package/src/scss/utilities/gradient/_index.scss +27 -28
  247. package/src/scss/utilities/gradient/_variables.scss +15 -0
  248. package/src/scss/utilities/height/_defaults.scss +0 -8
  249. package/src/scss/utilities/height/_index.scss +22 -21
  250. package/src/scss/utilities/inset/_defaults.scss +0 -16
  251. package/src/scss/utilities/inset/_index.scss +20 -20
  252. package/src/scss/utilities/justification/_defaults.scss +0 -33
  253. package/src/scss/utilities/justification/_index.scss +24 -25
  254. package/src/scss/utilities/list/_defaults.scss +0 -22
  255. package/src/scss/utilities/list/_index.scss +22 -22
  256. package/src/scss/utilities/order/_defaults.scss +0 -8
  257. package/src/scss/utilities/order/_index.scss +20 -19
  258. package/src/scss/utilities/position/_defaults.scss +0 -11
  259. package/src/scss/utilities/position/_index.scss +20 -19
  260. package/src/scss/utilities/ratio/_defaults.scss +0 -8
  261. package/src/scss/utilities/ratio/_index.scss +22 -21
  262. package/src/scss/utilities/ratio/_variables.scss +6 -0
  263. package/src/scss/utilities/spacing/_defaults.scss +0 -11
  264. package/src/scss/utilities/spacing/_index.scss +18 -17
  265. package/src/scss/utilities/typography/_defaults.scss +0 -22
  266. package/src/scss/utilities/typography/_index.scss +27 -26
  267. package/src/scss/utilities/visibility/_defaults.scss +0 -11
  268. package/src/scss/utilities/visibility/_index.scss +19 -18
  269. package/src/scss/utilities/visually-hidden/_index.scss +19 -17
  270. package/src/scss/utilities/width/_defaults.scss +0 -8
  271. package/src/scss/utilities/width/_index.scss +21 -20
  272. package/src/scss/utilities/z-index/_defaults.scss +0 -11
  273. package/src/scss/utilities/z-index/_index.scss +19 -18
@@ -1,76 +1,227 @@
1
1
  // @graupl/core typography theme styles.
2
+ //
3
+ // This module defines typography tokens for body text, small text, and headings.
4
+ //
5
+ // The following selectors are generated by default:
6
+ // - `:root`: Sets root font family and size.
7
+ // - `b`: Applies the bold weight token.
8
+ // - `strong`: Applies the bold weight token.
9
+ // - `body`: Applies body typography tokens.
10
+ // - `p`: Applies paragraph typography tokens.
11
+ // - `small`: Applies small text typography tokens.
12
+ // - `h1`: Applies H1 typography tokens.
13
+ // - `h2`: Applies H2 typography tokens.
14
+ // - `h3`: Applies H3 typography tokens.
15
+ // - `h4`: Applies H4 typography tokens.
16
+ // - `h5`: Applies H5 typography tokens.
17
+ // - `h6`: Applies H6 typography tokens.
18
+ //
19
+ // The following custom properties can be used to customize typography:
20
+ // | Property | Description | Default Value |
21
+ // | --- | --- | --- |
22
+ // | `--graupl-font-size-base` | Base font size used for scaling. | `1rem` |
23
+ // | `--graupl-line-height` | Base line height. | `1.2em` |
24
+ // | `--graupl-font-xs` | XS font size token. | `calc(0.694 * var(--graupl-font-size-base))` |
25
+ // | `--graupl-font-sm` | Small font size token. | `calc(0.833 * var(--graupl-font-size-base))` |
26
+ // | `--graupl-font-base` | Base font size token. | `var(--graupl-font-size-base)` |
27
+ // | `--graupl-font-lg` | Large font size token. | `calc(1.2 * var(--graupl-font-size-base))` |
28
+ // | `--graupl-font-xl` | XL font size token. | `calc(1.44 * var(--graupl-font-size-base))` |
29
+ // | `--graupl-font-2xl` | 2XL font size token. | `calc(1.728 * var(--graupl-font-size-base))` |
30
+ // | `--graupl-font-3xl` | 3XL font size token. | `calc(2.074 * var(--graupl-font-size-base))` |
31
+ // | `--graupl-font-4xl` | 4XL font size token. | `calc(2.488 * var(--graupl-font-size-base))` |
32
+ // | `--graupl-font-5xl` | 5XL font size token. | `calc(2.986 * var(--graupl-font-size-base))` |
33
+ // | `--graupl-font-weight-light` | Light font weight token. | `300` |
34
+ // | `--graupl-font-weight-normal` | Normal font weight token. | `400` |
35
+ // | `--graupl-font-weight-bold` | Bold font weight token. | `700` |
36
+ // | `--graupl-root-font-family` | Root font family. | `system-ui, -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, sans-serif` |
37
+ // | `--graupl-root-font-size` | Root font size. | `clamp(0.85rem, calc(0.8rem + 0.5vw), 1.25rem)` |
38
+ // | `--graupl-body-font-size` | Body font size. | `var(--graupl-font-base)` |
39
+ // | `--graupl-body-line-height` | Body line height. | `var(--graupl-line-height)` |
40
+ // | `--graupl-body-font-weight` | Body font weight. | `var(--graupl-font-weight-normal)` |
41
+ // | `--graupl-body-color` | Body text colour. | `var(--graupl-color)` |
42
+ // | `--graupl-paragraph-font-size` | Paragraph font size. | `var(--graupl-body-font-size)` |
43
+ // | `--graupl-paragraph-line-height` | Paragraph line height. | `var(--graupl-body-line-height)` |
44
+ // | `--graupl-paragraph-margin` | Paragraph margin. | `0 0 var(--graupl-spacer-2) 0` |
45
+ // | `--graupl-paragraph-font-weight` | Paragraph font weight. | `var(--graupl-body-font-weight)` |
46
+ // | `--graupl-paragraph-color` | Paragraph text colour. | `var(--graupl-body-color)` |
47
+ // | `--graupl-small-font-size` | Small text font size. | `var(--graupl-font-sm)` |
48
+ // | `--graupl-small-line-height` | Small text line height. | `var(--graupl-line-height)` |
49
+ // | `--graupl-small-margin` | Small text margin. | `0 0 var(--graupl-spacer-2) 0` |
50
+ // | `--graupl-small-font-weight` | Small text font weight. | `var(--graupl-body-font-weight)` |
51
+ // | `--graupl-small-color` | Small text colour. | `var(--graupl-body-color)` |
52
+ // | `--graupl-heading-font-family` | Heading font family. | `var(--graupl-root-font-family)` |
53
+ // | `--graupl-heading-line-height` | Heading line height. | `var(--graupl-line-height)` |
54
+ // | `--graupl-heading-margin` | Base heading margin. | `var(--graupl-spacer-5) 0 var(--graupl-spacer-2) 0` |
55
+ // | `--graupl-heading-font-weight` | Base heading font weight. | `var(--graupl-font-weight-bold)` |
56
+ // | `--graupl-heading-color` | Base heading colour. | `var(--graupl-color)` |
57
+ // | `--graupl-h1-font-size` | H1 font size. | `var(--graupl-font-5xl)` |
58
+ // | `--graupl-h1-line-height` | H1 line height. | `var(--graupl-heading-line-height)` |
59
+ // | `--graupl-h1-margin` | H1 margin. | `var(--graupl-heading-margin)` |
60
+ // | `--graupl-h1-font-family` | H1 font family. | `var(--graupl-heading-font-family)` |
61
+ // | `--graupl-h1-font-weight` | H1 font weight. | `var(--graupl-heading-font-weight)` |
62
+ // | `--graupl-h1-color` | H1 colour. | `var(--graupl-heading-color)` |
63
+ // | `--graupl-h2-font-size` | H2 font size. | `var(--graupl-font-4xl)` |
64
+ // | `--graupl-h2-line-height` | H2 line height. | `var(--graupl-heading-line-height)` |
65
+ // | `--graupl-h2-margin` | H2 margin. | `var(--graupl-heading-margin)` |
66
+ // | `--graupl-h2-font-family` | H2 font family. | `var(--graupl-heading-font-family)` |
67
+ // | `--graupl-h2-font-weight` | H2 font weight. | `var(--graupl-heading-font-weight)` |
68
+ // | `--graupl-h2-color` | H2 colour. | `var(--graupl-heading-color)` |
69
+ // | `--graupl-h3-font-size` | H3 font size. | `var(--graupl-font-3xl)` |
70
+ // | `--graupl-h3-line-height` | H3 line height. | `var(--graupl-heading-line-height)` |
71
+ // | `--graupl-h3-margin` | H3 margin. | `var(--graupl-heading-margin)` |
72
+ // | `--graupl-h3-font-family` | H3 font family. | `var(--graupl-heading-font-family)` |
73
+ // | `--graupl-h3-font-weight` | H3 font weight. | `var(--graupl-heading-font-weight)` |
74
+ // | `--graupl-h3-color` | H3 colour. | `var(--graupl-heading-color)` |
75
+ // | `--graupl-h4-font-size` | H4 font size. | `var(--graupl-font-2xl)` |
76
+ // | `--graupl-h4-line-height` | H4 line height. | `var(--graupl-heading-line-height)` |
77
+ // | `--graupl-h4-margin` | H4 margin. | `var(--graupl-heading-margin)` |
78
+ // | `--graupl-h4-font-family` | H4 font family. | `var(--graupl-heading-font-family)` |
79
+ // | `--graupl-h4-font-weight` | H4 font weight. | `var(--graupl-heading-font-weight)` |
80
+ // | `--graupl-h4-color` | H4 colour. | `var(--graupl-heading-color)` |
81
+ // | `--graupl-h5-font-size` | H5 font size. | `var(--graupl-font-xl)` |
82
+ // | `--graupl-h5-line-height` | H5 line height. | `var(--graupl-heading-line-height)` |
83
+ // | `--graupl-h5-margin` | H5 margin. | `var(--graupl-heading-margin)` |
84
+ // | `--graupl-h5-font-family` | H5 font family. | `var(--graupl-heading-font-family)` |
85
+ // | `--graupl-h5-font-weight` | H5 font weight. | `var(--graupl-heading-font-weight)` |
86
+ // | `--graupl-h5-color` | H5 colour. | `var(--graupl-heading-color)` |
87
+ // | `--graupl-h6-font-size` | H6 font size. | `var(--graupl-font-lg)` |
88
+ // | `--graupl-h6-line-height` | H6 line height. | `var(--graupl-heading-line-height)` |
89
+ // | `--graupl-h6-margin` | H6 margin. | `var(--graupl-heading-margin)` |
90
+ // | `--graupl-h6-font-family` | H6 font family. | `var(--graupl-heading-font-family)` |
91
+ // | `--graupl-h6-font-weight` | H6 font weight. | `var(--graupl-heading-font-weight)` |
92
+ // | `--graupl-h6-color` | H6 colour. | `var(--graupl-heading-color)` |
93
+ //
94
+ // The following sass variables can be used to customize typography generation:
95
+ // | Variable | Description | Default Value |
96
+ // | --- | --- | --- |
97
+ // | `$selector-base` | The selector base for the component. | `""` |
98
+ // | `$modifier-selector-base` | The selector base for component modifiers. | `"."` |
99
+ // | `$paragraph-selector-base` | The base selector for the paragraph component. | `$selector-base` |
100
+ // | `$paragraph-selector` | The selector for the paragraph component. | `"p"` |
101
+ // | `$small-selector-base` | The base selector for the small component. | `$selector-base` |
102
+ // | `$small-selector` | The selector for the small component. | `"small"` |
103
+ // | `$h1-selector-base` | The base selector for the h1 component. | `$selector-base` |
104
+ // | `$h1-selector` | The selector for the h1 component. | `"h1"` |
105
+ // | `$h2-selector-base` | The base selector for the h2 component. | `$selector-base` |
106
+ // | `$h2-selector` | The selector for the h2 component. | `"h2"` |
107
+ // | `$h3-selector-base` | The base selector for the h3 component. | `$selector-base` |
108
+ // | `$h3-selector` | The selector for the h3 component. | `"h3"` |
109
+ // | `$h4-selector-base` | The base selector for the h4 component. | `$selector-base` |
110
+ // | `$h4-selector` | The selector for the h4 component. | `"h4"` |
111
+ // | `$h5-selector-base` | The base selector for the h5 component. | `$selector-base` |
112
+ // | `$h5-selector` | The selector for the h5 component. | `"h5"` |
113
+ // | `$h6-selector-base` | The base selector for the h6 component. | `$selector-base` |
114
+ // | `$h6-selector` | The selector for the h6 component. | `"h6"` |
115
+ // | `$root-selector-base` | The base selector for the root component. | `":"` |
116
+ // | `$root-selector` | The selector for the root component. | `"root"` |
117
+ // | `$bold-selector-base` | The base selector for the bold component. | `$selector-base` |
118
+ // | `$bold-selector` | The selector for the bold component. | `"b"` |
119
+ // | `$strong-selector-base` | The base selector for the strong component. | `$selector-base` |
120
+ // | `$strong-selector` | The selector for the strong component. | `"strong"` |
121
+ // | `$body-selector-base` | The base selector for the body component. | `$selector-base` |
122
+ // | `$body-selector` | The selector for the body component. | `"body"` |
123
+ // | `$generate-base-font-sizes` | Flag to generate the base font-size scale. | `true` |
124
+ // | `$generate-base-font-weights` | Flag to generate the base font-weight scale. | `true` |
125
+ // | `$font-size-base` | Base font size for the scale. | `1rem` |
126
+ // | `$root-font-size` | Root font size value. | `clamp(0.85rem, calc(0.8rem + 0.5vw), 1.25rem)` |
127
+ // | `$line-height` | Base line height. | `1.2em` |
128
+ // | `$font-size-multipliers` | Map of size keys to multipliers. | Minor third scale (see `_defaults.scss`) |
129
+ // | `$font-weights` | Map of weight keys to values. | `light:300`, `normal:400`, `bold:700` |
130
+ // | `$root-font-family` | Root font family stack. | System stack |
131
+ //
132
+ // @example
133
+ // <div>
134
+ // <h1>Heading 1</h1>
135
+ // <p>Body copy with a <strong>bold</strong> word.</p>
136
+ // <small>Supporting small text.</small>
137
+ // </div>
2
138
 
139
+ @use "defaults";
3
140
  @use "variables" as *;
4
141
  @use "../../mixins/layer" as *;
5
142
  @use "sass:map";
6
143
 
7
144
  @include layer(base) {
8
- p {
145
+ // p
146
+ #{defaults.$paragraph-selector-base}#{defaults.$paragraph-selector} {
9
147
  margin: $paragraph-margin;
10
148
  }
11
149
 
12
- small {
150
+ // small
151
+ #{defaults.$small-selector-base}#{defaults.$small-selector} {
13
152
  margin: $small-margin;
14
153
  }
15
154
 
16
- h1 {
155
+ // h1
156
+ #{defaults.$h1-selector-base}#{defaults.$h1-selector} {
17
157
  margin: $h1-margin;
18
158
  }
19
159
 
20
- h2 {
160
+ // h2
161
+ #{defaults.$h2-selector-base}#{defaults.$h2-selector} {
21
162
  margin: $h2-margin;
22
163
  }
23
164
 
24
- h3 {
165
+ // h3
166
+ #{defaults.$h3-selector-base}#{defaults.$h3-selector} {
25
167
  margin: $h3-margin;
26
168
  }
27
169
 
28
- h4 {
170
+ // h4
171
+ #{defaults.$h4-selector-base}#{defaults.$h4-selector} {
29
172
  margin: $h4-margin;
30
173
  }
31
174
 
32
- h5 {
175
+ // h5
176
+ #{defaults.$h5-selector-base}#{defaults.$h5-selector} {
33
177
  margin: $h5-margin;
34
178
  }
35
179
 
36
- h6 {
180
+ // h6
181
+ #{defaults.$h6-selector-base}#{defaults.$h6-selector} {
37
182
  margin: $h6-margin;
38
183
  }
39
184
  }
40
185
 
41
186
  @include layer(theme) {
42
- :root {
187
+ // :root
188
+ #{defaults.$root-selector-base}#{defaults.$root-selector} {
43
189
  font-family: $root-font-family;
44
190
  font-size: $root-font-size;
45
191
  }
46
192
 
47
- b,
48
- strong {
193
+ // b, strong
194
+ #{defaults.$bold-selector-base}#{defaults.$bold-selector},
195
+ #{defaults.$strong-selector-base}#{defaults.$strong-selector} {
49
196
  font-weight: $font-weight-bold;
50
197
  }
51
198
 
52
- body {
199
+ // body
200
+ #{defaults.$body-selector-base}#{defaults.$body-selector} {
53
201
  color: $body-color;
54
202
  font-size: $body-font-size;
55
203
  font-weight: $body-font-weight;
56
204
  line-height: $body-line-height;
57
205
  }
58
206
 
59
- p {
207
+ // p
208
+ #{defaults.$paragraph-selector-base}#{defaults.$paragraph-selector} {
60
209
  color: $paragraph-color;
61
210
  font-size: $paragraph-font-size;
62
211
  font-weight: $paragraph-font-weight;
63
212
  line-height: $paragraph-line-height;
64
213
  }
65
214
 
66
- small {
215
+ // small
216
+ #{defaults.$small-selector-base}#{defaults.$small-selector} {
67
217
  color: $small-color;
68
218
  font-size: $small-font-size;
69
219
  font-weight: $small-font-weight;
70
220
  line-height: $small-line-height;
71
221
  }
72
222
 
73
- h1 {
223
+ // h1
224
+ #{defaults.$h1-selector-base}#{defaults.$h1-selector} {
74
225
  color: $h1-color;
75
226
  font-family: $h1-font-family;
76
227
  font-size: $h1-font-size;
@@ -78,7 +229,8 @@
78
229
  line-height: $h1-line-height;
79
230
  }
80
231
 
81
- h2 {
232
+ // h2
233
+ #{defaults.$h2-selector-base}#{defaults.$h2-selector} {
82
234
  color: $h2-color;
83
235
  font-family: $h2-font-family;
84
236
  font-size: $h2-font-size;
@@ -86,7 +238,8 @@
86
238
  line-height: $h2-line-height;
87
239
  }
88
240
 
89
- h3 {
241
+ // h3
242
+ #{defaults.$h3-selector-base}#{defaults.$h3-selector} {
90
243
  color: $h3-color;
91
244
  font-family: $h3-font-family;
92
245
  font-size: $h3-font-size;
@@ -94,7 +247,8 @@
94
247
  line-height: $h3-line-height;
95
248
  }
96
249
 
97
- h4 {
250
+ // h4
251
+ #{defaults.$h4-selector-base}#{defaults.$h4-selector} {
98
252
  color: $h4-color;
99
253
  font-family: $h4-font-family;
100
254
  font-size: $h4-font-size;
@@ -102,7 +256,8 @@
102
256
  line-height: $h4-line-height;
103
257
  }
104
258
 
105
- h5 {
259
+ // h5
260
+ #{defaults.$h5-selector-base}#{defaults.$h5-selector} {
106
261
  color: $h5-color;
107
262
  font-family: $h5-font-family;
108
263
  font-size: $h5-font-size;
@@ -110,7 +265,8 @@
110
265
  line-height: $h5-line-height;
111
266
  }
112
267
 
113
- h6 {
268
+ // h6
269
+ #{defaults.$h6-selector-base}#{defaults.$h6-selector} {
114
270
  color: $h6-color;
115
271
  font-family: $h6-font-family;
116
272
  font-size: $h6-font-size;