material 3.7.2 → 3.7.3

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 (264) hide show
  1. package/README.md +2 -2
  2. package/dist/components/slider/features/controller.js +24 -8
  3. package/dist/elements/css/card.css +1 -1
  4. package/dist/elements/css/card.js +1 -1
  5. package/dist/elements/css/dialog.css +1 -1
  6. package/dist/elements/css/dialog.js +1 -1
  7. package/dist/elements/css/menu.css +1 -1
  8. package/dist/elements/css/menu.js +1 -1
  9. package/dist/elements/css/select.css +1 -1
  10. package/dist/elements/css/select.js +1 -1
  11. package/dist/elements/css/slider.css +1 -1
  12. package/dist/elements/css/slider.js +1 -1
  13. package/dist/elements/css/tabs.css +1 -1
  14. package/dist/elements/css/tabs.js +1 -1
  15. package/dist/elements/css/timepicker.css +1 -1
  16. package/dist/elements/css/timepicker.js +1 -1
  17. package/dist/elements/preupgrade/badge.css +1 -1
  18. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  19. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  20. package/dist/elements/preupgrade/button-group.css +1 -1
  21. package/dist/elements/preupgrade/button.css +1 -1
  22. package/dist/elements/preupgrade/card.css +1 -1
  23. package/dist/elements/preupgrade/carousel.css +1 -1
  24. package/dist/elements/preupgrade/checkbox.css +1 -1
  25. package/dist/elements/preupgrade/chips.css +1 -1
  26. package/dist/elements/preupgrade/datepicker.css +1 -1
  27. package/dist/elements/preupgrade/dialog.css +1 -1
  28. package/dist/elements/preupgrade/divider.css +1 -1
  29. package/dist/elements/preupgrade/drawer.css +1 -1
  30. package/dist/elements/preupgrade/extended-fab.css +1 -1
  31. package/dist/elements/preupgrade/fab-menu.css +1 -1
  32. package/dist/elements/preupgrade/fab.css +1 -1
  33. package/dist/elements/preupgrade/icon-button.css +1 -1
  34. package/dist/elements/preupgrade/list.css +1 -1
  35. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  36. package/dist/elements/preupgrade/menu.css +1 -1
  37. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  38. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  39. package/dist/elements/preupgrade/progress.css +1 -1
  40. package/dist/elements/preupgrade/radios.css +1 -1
  41. package/dist/elements/preupgrade/search.css +1 -1
  42. package/dist/elements/preupgrade/select.css +1 -1
  43. package/dist/elements/preupgrade/side-sheet.css +1 -1
  44. package/dist/elements/preupgrade/slider.css +1 -1
  45. package/dist/elements/preupgrade/snackbar.css +1 -1
  46. package/dist/elements/preupgrade/split-button.css +1 -1
  47. package/dist/elements/preupgrade/switch.css +1 -1
  48. package/dist/elements/preupgrade/tabs.css +1 -1
  49. package/dist/elements/preupgrade/text-field.css +1 -1
  50. package/dist/elements/preupgrade/timepicker.css +1 -1
  51. package/dist/elements/preupgrade/toolbar.css +1 -1
  52. package/dist/elements/preupgrade/tooltip.css +1 -1
  53. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  54. package/dist/elements/preupgrade.css +1 -1
  55. package/dist/styles/badge.css +1 -1
  56. package/dist/styles/base-lite.css +1 -1
  57. package/dist/styles/base.css +1 -1
  58. package/dist/styles/bottom-app-bar.css +1 -1
  59. package/dist/styles/bottom-sheet.css +1 -1
  60. package/dist/styles/button-group.css +1 -1
  61. package/dist/styles/button.css +1 -1
  62. package/dist/styles/card.css +2 -2
  63. package/dist/styles/carousel.css +1 -1
  64. package/dist/styles/checkbox.css +1 -1
  65. package/dist/styles/chips.css +1 -1
  66. package/dist/styles/contrast.css +1 -1
  67. package/dist/styles/datepicker.css +1 -1
  68. package/dist/styles/dialog.css +2 -2
  69. package/dist/styles/divider.css +1 -1
  70. package/dist/styles/drawer.css +1 -1
  71. package/dist/styles/extended-fab.css +1 -1
  72. package/dist/styles/fab-menu.css +1 -1
  73. package/dist/styles/fab.css +1 -1
  74. package/dist/styles/icon-button.css +1 -1
  75. package/dist/styles/list.css +1 -1
  76. package/dist/styles/loading-indicator.css +1 -1
  77. package/dist/styles/menu.css +2 -2
  78. package/dist/styles/navigation-bar.css +1 -1
  79. package/dist/styles/navigation-rail.css +1 -1
  80. package/dist/styles/progress.css +1 -1
  81. package/dist/styles/radios.css +1 -1
  82. package/dist/styles/search.css +1 -1
  83. package/dist/styles/select.css +2 -2
  84. package/dist/styles/side-sheet.css +1 -1
  85. package/dist/styles/slider.css +2 -2
  86. package/dist/styles/snackbar.css +1 -1
  87. package/dist/styles/split-button.css +1 -1
  88. package/dist/styles/switch.css +1 -1
  89. package/dist/styles/tabs.css +2 -2
  90. package/dist/styles/text-field.css +1 -1
  91. package/dist/styles/timepicker.css +2 -2
  92. package/dist/styles/toolbar.css +1 -1
  93. package/dist/styles/tooltip.css +1 -1
  94. package/dist/styles/top-app-bar.css +1 -1
  95. package/dist/styles/typography.css +1 -1
  96. package/dist/styles/utilities.css +1 -1
  97. package/dist/styles.css +2 -2
  98. package/dist/themes/autumn-contrast.css +1 -1
  99. package/dist/themes/autumn.css +1 -1
  100. package/dist/themes/baseline-contrast.css +1 -1
  101. package/dist/themes/baseline.css +1 -1
  102. package/dist/themes/brownbeige-contrast.css +1 -1
  103. package/dist/themes/brownbeige.css +1 -1
  104. package/dist/themes/content-contrast.css +1 -1
  105. package/dist/themes/content.css +1 -1
  106. package/dist/themes/desert-contrast.css +1 -1
  107. package/dist/themes/desert.css +1 -1
  108. package/dist/themes/expressive-contrast.css +1 -1
  109. package/dist/themes/expressive.css +1 -1
  110. package/dist/themes/fidelity-contrast.css +1 -1
  111. package/dist/themes/fidelity.css +1 -1
  112. package/dist/themes/forest-contrast.css +1 -1
  113. package/dist/themes/forest.css +1 -1
  114. package/dist/themes/fruit-salad-contrast.css +1 -1
  115. package/dist/themes/fruit-salad.css +1 -1
  116. package/dist/themes/highcontrast-contrast.css +1 -1
  117. package/dist/themes/highcontrast.css +1 -1
  118. package/dist/themes/monochrome-contrast.css +1 -1
  119. package/dist/themes/monochrome.css +1 -1
  120. package/dist/themes/neutral-contrast.css +1 -1
  121. package/dist/themes/neutral.css +1 -1
  122. package/dist/themes/ocean-contrast.css +1 -1
  123. package/dist/themes/ocean.css +1 -1
  124. package/dist/themes/rainbow-contrast.css +1 -1
  125. package/dist/themes/rainbow.css +1 -1
  126. package/dist/themes/sageivory-contrast.css +1 -1
  127. package/dist/themes/sageivory.css +1 -1
  128. package/dist/themes/spring-contrast.css +1 -1
  129. package/dist/themes/spring.css +1 -1
  130. package/dist/themes/summer-contrast.css +1 -1
  131. package/dist/themes/summer.css +1 -1
  132. package/dist/themes/sunset-contrast.css +1 -1
  133. package/dist/themes/sunset.css +1 -1
  134. package/dist/themes/tealcaramel-contrast.css +1 -1
  135. package/dist/themes/tealcaramel.css +1 -1
  136. package/dist/themes/vibrant-contrast.css +1 -1
  137. package/dist/themes/vibrant.css +1 -1
  138. package/package.json +2 -1
  139. package/src/styles/abstract/_base.scss +0 -1
  140. package/src/styles/abstract/_direction.scss +121 -152
  141. package/src/styles/abstract/_emit.scss +7 -16
  142. package/src/styles/abstract/_floating-placement.scss +9 -10
  143. package/src/styles/abstract/_functions.scss +64 -79
  144. package/src/styles/abstract/_mixins.scss +355 -459
  145. package/src/styles/abstract/_theme.scss +122 -136
  146. package/src/styles/abstract/_variables.scss +320 -390
  147. package/src/styles/abstract/chips/_assist.scss +2 -3
  148. package/src/styles/abstract/chips/_filter.scss +2 -3
  149. package/src/styles/abstract/chips/_input.scss +2 -3
  150. package/src/styles/abstract/chips/_suggestion.scss +2 -3
  151. package/src/styles/base/_body-theme.scss +10 -15
  152. package/src/styles/base/_document.scss +10 -33
  153. package/src/styles/base/_reset.scss +20 -40
  154. package/src/styles/base/_tokens.scss +6 -21
  155. package/src/styles/base/_typescale-tokens.scss +12 -16
  156. package/src/styles/base/_typography.scss +28 -37
  157. package/src/styles/components/_badge.scss +171 -193
  158. package/src/styles/components/_bottom-app-bar.scss +72 -90
  159. package/src/styles/components/_bottom-sheet.scss +188 -232
  160. package/src/styles/components/_button-group.scss +140 -189
  161. package/src/styles/components/_button.scss +382 -478
  162. package/src/styles/components/_card.scss +349 -473
  163. package/src/styles/components/_carousel.scss +134 -156
  164. package/src/styles/components/_checkbox.scss +208 -249
  165. package/src/styles/components/_chips.scss +239 -304
  166. package/src/styles/components/_datepicker.scss +172 -222
  167. package/src/styles/components/_dialog.scss +428 -553
  168. package/src/styles/components/_divider.scss +37 -46
  169. package/src/styles/components/_drawer.scss +571 -678
  170. package/src/styles/components/_extended-fab.scss +263 -294
  171. package/src/styles/components/_fab-menu.scss +225 -267
  172. package/src/styles/components/_fab.scss +197 -218
  173. package/src/styles/components/_icon-button.scss +483 -588
  174. package/src/styles/components/_list.scss +115 -144
  175. package/src/styles/components/_loading-indicator.scss +23 -29
  176. package/src/styles/components/_menu.scss +543 -699
  177. package/src/styles/components/_navigation-bar.scss +189 -234
  178. package/src/styles/components/_navigation-rail.scss +256 -312
  179. package/src/styles/components/_progress.scss +60 -85
  180. package/src/styles/components/_radios.scss +170 -207
  181. package/src/styles/components/_search.scss +369 -455
  182. package/src/styles/components/_select.scss +78 -185
  183. package/src/styles/components/_side-sheet.scss +234 -292
  184. package/src/styles/components/_slider.scss +289 -367
  185. package/src/styles/components/_snackbar.scss +149 -198
  186. package/src/styles/components/_split-button.scss +139 -228
  187. package/src/styles/components/_switch.scss +282 -349
  188. package/src/styles/components/_tabs.scss +350 -547
  189. package/src/styles/components/_text-field.scss +788 -980
  190. package/src/styles/components/_timepicker.scss +435 -506
  191. package/src/styles/components/_toolbar.scss +178 -242
  192. package/src/styles/components/_tooltip.scss +152 -197
  193. package/src/styles/components/_top-app-bar.scss +206 -230
  194. package/src/styles/elements/_badge.scss +42 -61
  195. package/src/styles/elements/_bottom-app-bar.scss +14 -20
  196. package/src/styles/elements/_bottom-sheet.scss +0 -3
  197. package/src/styles/elements/_button-group.scss +80 -80
  198. package/src/styles/elements/_button.scss +72 -88
  199. package/src/styles/elements/_card.scss +48 -57
  200. package/src/styles/elements/_carousel.scss +2 -5
  201. package/src/styles/elements/_checkbox.scss +32 -43
  202. package/src/styles/elements/_chips.scss +18 -22
  203. package/src/styles/elements/_config.scss +11 -26
  204. package/src/styles/elements/_datepicker.scss +17 -22
  205. package/src/styles/elements/_dialog.scss +0 -3
  206. package/src/styles/elements/_divider.scss +11 -13
  207. package/src/styles/elements/_drawer.scss +9 -14
  208. package/src/styles/elements/_extended-fab.scss +36 -40
  209. package/src/styles/elements/_fab-menu.scss +21 -25
  210. package/src/styles/elements/_fab.scss +17 -20
  211. package/src/styles/elements/_field.scss +93 -114
  212. package/src/styles/elements/_icon-button.scss +34 -38
  213. package/src/styles/elements/_index.scss +0 -4
  214. package/src/styles/elements/_list.scss +19 -26
  215. package/src/styles/elements/_loading-indicator.scss +6 -9
  216. package/src/styles/elements/_menu.scss +0 -3
  217. package/src/styles/elements/_navigation-bar.scss +5 -9
  218. package/src/styles/elements/_navigation-rail.scss +10 -15
  219. package/src/styles/elements/_progress.scss +15 -18
  220. package/src/styles/elements/_radios.scss +24 -49
  221. package/src/styles/elements/_search.scss +19 -24
  222. package/src/styles/elements/_select.scss +4 -9
  223. package/src/styles/elements/_side-sheet.scss +0 -3
  224. package/src/styles/elements/_slider.scss +15 -35
  225. package/src/styles/elements/_snackbar.scss +0 -3
  226. package/src/styles/elements/_split-button.scss +33 -39
  227. package/src/styles/elements/_switch.scss +50 -90
  228. package/src/styles/elements/_tabs.scss +9 -13
  229. package/src/styles/elements/_text-field.scss +150 -178
  230. package/src/styles/elements/_timepicker.scss +0 -3
  231. package/src/styles/elements/_toolbar.scss +30 -35
  232. package/src/styles/elements/_tooltip.scss +0 -3
  233. package/src/styles/elements/_top-app-bar.scss +38 -45
  234. package/src/styles/main.scss +0 -15
  235. package/src/styles/themes/_autumn.scss +240 -258
  236. package/src/styles/themes/_base-theme.scss +96 -128
  237. package/src/styles/themes/_baseline.scss +273 -314
  238. package/src/styles/themes/_brownbeige.scss +242 -250
  239. package/src/styles/themes/_content.scss +240 -248
  240. package/src/styles/themes/_desert.scss +242 -250
  241. package/src/styles/themes/_expressive.scss +242 -250
  242. package/src/styles/themes/_fidelity.scss +240 -248
  243. package/src/styles/themes/_forest.scss +242 -259
  244. package/src/styles/themes/_fruit-salad.scss +242 -250
  245. package/src/styles/themes/_highcontrast.scss +164 -172
  246. package/src/styles/themes/_index.scss +0 -1
  247. package/src/styles/themes/_monochrome.scss +226 -234
  248. package/src/styles/themes/_neutral.scss +242 -250
  249. package/src/styles/themes/_ocean.scss +242 -259
  250. package/src/styles/themes/_rainbow.scss +242 -250
  251. package/src/styles/themes/_sageivory.scss +242 -250
  252. package/src/styles/themes/_spring.scss +238 -255
  253. package/src/styles/themes/_summer.scss +242 -250
  254. package/src/styles/themes/_sunset.scss +242 -259
  255. package/src/styles/themes/_tealcaramel.scss +242 -250
  256. package/src/styles/themes/_vibrant.scss +242 -250
  257. package/src/styles/utilities/_colors.scss +44 -50
  258. package/src/styles/utilities/_flexbox.scss +48 -59
  259. package/src/styles/utilities/_layout.scss +516 -591
  260. package/src/styles/utilities/_ripple.scss +61 -70
  261. package/src/styles/utilities/_spacing.scss +120 -127
  262. package/src/styles/utilities/_typography.scss +45 -58
  263. package/src/styles/utilities/_visibility.scss +61 -76
  264. package/dist/package.json +0 -488
@@ -1,7 +1,6 @@
1
- // Compose Material 3 AssistChipTokens.kt (VERSION 7_0_1).
2
1
  @use "../base" as base;
3
2
  @use "../theme" as t;
4
3
  @mixin tokens {
5
- --#{base.$prefix}-chip-label-color: #{t.color("on-surface")};
6
- --#{base.$prefix}-chip-leading-color: #{t.color("primary")};
4
+ --#{base.$prefix}-chip-label-color: #{t.color("on-surface")};
5
+ --#{base.$prefix}-chip-leading-color: #{t.color("primary")};
7
6
  }
@@ -1,7 +1,6 @@
1
- // Compose Material 3 FilterChipTokens.kt (VERSION 7_0_1).
2
1
  @use "../base" as base;
3
2
  @use "../theme" as t;
4
3
  @mixin tokens {
5
- --#{base.$prefix}-chip-label-color: #{t.color("on-surface-variant")};
6
- --#{base.$prefix}-chip-leading-color: #{t.color("primary")};
4
+ --#{base.$prefix}-chip-label-color: #{t.color("on-surface-variant")};
5
+ --#{base.$prefix}-chip-leading-color: #{t.color("primary")};
7
6
  }
@@ -1,7 +1,6 @@
1
- // Compose Material 3 InputChipTokens.kt (VERSION 7_0_1).
2
1
  @use "../base" as base;
3
2
  @use "../theme" as t;
4
3
  @mixin tokens {
5
- --#{base.$prefix}-chip-label-color: #{t.color("on-surface-variant")};
6
- --#{base.$prefix}-chip-leading-color: #{t.color("on-surface-variant")};
4
+ --#{base.$prefix}-chip-label-color: #{t.color("on-surface-variant")};
5
+ --#{base.$prefix}-chip-leading-color: #{t.color("on-surface-variant")};
7
6
  }
@@ -1,7 +1,6 @@
1
- // Compose Material 3 SuggestionChipTokens.kt (VERSION 7_0_1).
2
1
  @use "../base" as base;
3
2
  @use "../theme" as t;
4
3
  @mixin tokens {
5
- --#{base.$prefix}-chip-label-color: #{t.color("on-surface-variant")};
6
- --#{base.$prefix}-chip-leading-color: #{t.color("primary")};
4
+ --#{base.$prefix}-chip-label-color: #{t.color("on-surface-variant")};
5
+ --#{base.$prefix}-chip-leading-color: #{t.color("primary")};
7
6
  }
@@ -1,22 +1,17 @@
1
- // src/styles/base/_body-theme.scss
2
1
 
3
2
  @use "../abstract/base";
4
3
  @use "../abstract/mixins" as m;
5
4
 
6
- // The page's theme: surface and on-surface, the body-medium type role, and the
7
- // colour transition when light or dark changes. Split from _document.scss so
8
- // `material/styles/base-lite` carries the theme without the reset;
9
- // _document.scss uses this partial, so `material/styles/base` is unchanged.
10
5
  body {
11
- margin: 0;
12
- padding: 0;
13
- background-color: var(--#{base.$prefix}-sys-color-surface);
14
- color: var(--#{base.$prefix}-sys-color-on-surface);
15
- font-family: var(--#{base.$prefix}-sys-typescale-body-medium-font);
16
- font-size: var(--#{base.$prefix}-sys-typescale-body-medium-font-size);
17
- line-height: var(--#{base.$prefix}-sys-typescale-body-medium-line-height);
18
- -webkit-font-smoothing: antialiased;
19
- -moz-osx-font-smoothing: grayscale;
6
+ margin: 0;
7
+ padding: 0;
8
+ background-color: var(--#{base.$prefix}-sys-color-surface);
9
+ color: var(--#{base.$prefix}-sys-color-on-surface);
10
+ font-family: var(--#{base.$prefix}-sys-typescale-body-medium-font);
11
+ font-size: var(--#{base.$prefix}-sys-typescale-body-medium-font-size);
12
+ line-height: var(--#{base.$prefix}-sys-typescale-body-medium-line-height);
13
+ -webkit-font-smoothing: antialiased;
14
+ -moz-osx-font-smoothing: grayscale;
20
15
 
21
- @include m.motion-transition(background-color, color);
16
+ @include m.motion-transition(background-color, color);
22
17
  }
@@ -1,44 +1,21 @@
1
1
  @use "body-theme";
2
2
  @use "../abstract/mixins" as m;
3
3
 
4
- // Base styles
5
- //
6
- // The body rule lives in body-theme: `material/styles/base-lite` compiles it
7
- // without this document reset.
8
-
9
- // // Ensure links have the correct contrast
10
- // a {
11
- // color: var(--#{base.$prefix}-sys-color-primary);
12
- // text-decoration: none;
13
-
14
- // &:hover {
15
- // text-decoration: underline;
16
- // }
17
-
18
- // // &:focus-visible {
19
- // // outline: 2px solid var(--#{base.$prefix}-sys-color-primary);
20
- // // outline-offset: 2px;
21
- // // }
22
- // }
23
-
24
- // // Focus styles for keyboard navigation
25
- // // :focus-visible {
26
- // // outline: 2px solid var(--#{base.$prefix}-sys-color-primary);
27
- // // outline-offset: 2px;
28
- // // }
29
-
30
- // // Use smooth scrolling for the page
4
+
5
+
6
+
7
+
8
+
31
9
  html {
32
- scroll-behavior: smooth;
10
+ scroll-behavior: smooth;
33
11
 
34
- @include m.reduced-motion {
35
- scroll-behavior: auto;
36
- }
12
+ @include m.reduced-motion {
13
+ scroll-behavior: auto;
14
+ }
37
15
  }
38
16
 
39
- // Set box-sizing for all elements
40
17
  *,
41
18
  *::before,
42
19
  *::after {
43
- box-sizing: border-box;
20
+ box-sizing: border-box;
44
21
  }
@@ -1,82 +1,62 @@
1
- // src/styles/base/_reset.scss
2
1
 
3
2
  @use "../abstract/mixins" as m;
4
3
 
5
- // Modern CSS Reset
6
- // Adapted and simplified for mtrl
7
4
 
8
- // Use border-box by default
9
5
  *,
10
6
  *::before,
11
7
  *::after {
12
- box-sizing: border-box;
8
+ box-sizing: border-box;
13
9
  }
14
10
 
15
- // Remove default margin and padding
16
11
  html,
17
12
  body,
18
13
  h1, h2, h3, h4, h5, h6,
19
14
  p, figure, blockquote, dl, dd {
20
- margin: 0;
21
- padding: 0;
15
+ margin: 0;
16
+ padding: 0;
22
17
  }
23
18
 
24
- // Set core body defaults
25
19
  body {
26
- min-height: 100vh;
27
- text-rendering: optimizeSpeed;
28
- line-height: 1.5;
20
+ min-height: 100vh;
21
+ text-rendering: optimizeSpeed;
22
+ line-height: 1.5;
29
23
  }
30
24
 
31
- // Make images easier to work with
32
25
  img,
33
26
  picture {
34
- max-width: 100%;
35
- display: block;
27
+ max-width: 100%;
28
+ display: block;
36
29
  }
37
30
 
38
- // Inherit fonts for inputs and buttons
39
31
  input,
40
32
  button,
41
33
  textarea,
42
34
  select {
43
- font: inherit;
35
+ font: inherit;
44
36
  }
45
37
 
46
- // For people who prefer reduced motion, movement stops and fades stay.
47
- // WCAG 2.3.3 is about motion: things that move, grow or slide. A short
48
- // cross-fade is what platforms put in its place, and a dialog or menu that
49
- // cuts in and out with no fade at all is harder to follow, not easier. So
50
- // transitions are limited to the properties that fade, and anything else a
51
- // component transitions (transform, height, position, clip) changes at once.
52
- // The fades keep the duration their component gave them. Components' own
53
- // reduced-motion rules still apply on top of this.
54
38
  @include m.global-reduced-motion;
55
39
 
56
- // Reset button styles
57
40
  button {
58
- background: transparent;
59
- border: none;
60
- cursor: pointer;
61
- padding: 0;
41
+ background: transparent;
42
+ border: none;
43
+ cursor: pointer;
44
+ padding: 0;
62
45
  }
63
46
 
64
- // Remove list styles
65
47
  ul,
66
48
  ol {
67
- list-style: none;
68
- margin: 0;
69
- padding: 0;
49
+ list-style: none;
50
+ margin: 0;
51
+ padding: 0;
70
52
  }
71
53
 
72
- // Set default link style
73
54
  a {
74
- text-decoration: none;
75
- color: inherit;
55
+ text-decoration: none;
56
+ color: inherit;
76
57
  }
77
58
 
78
- // Tables
79
59
  table {
80
- border-collapse: collapse;
81
- border-spacing: 0;
60
+ border-collapse: collapse;
61
+ border-spacing: 0;
82
62
  }
@@ -1,33 +1,18 @@
1
- // src/styles/base/_tokens.scss
2
- // Material's system tokens as CSS custom properties, emitted from the Sass maps
3
- // that already hold them. Colour belongs to a theme and is emitted per theme
4
- // (themes/_base-theme.scss, `create-theme`); shape and type are system-wide, so
5
- // they sit on :root, and a theme may still override any of them.
6
- //
7
- // Material models the two faces as reference tokens: an application sets
8
- // `--mtrl-ref-typeface-brand` or `--mtrl-ref-typeface-plain` once and every role
9
- // follows. Display, headline and title wear the brand face, body and label the
10
- // plain one.
11
1
 
12
2
  @use 'sass:map';
13
3
  @use '../abstract/base' as base;
14
4
  @use '../abstract/variables' as v;
15
5
  @use 'typescale-tokens' as scale;
16
6
 
17
- // `all` keeps every role here, which is what the full stylesheet emits.
18
- // The base entry configures `body`: only the three tokens its body rule reads.
19
7
  $typescale-tokens: 'all' !default;
20
8
 
21
9
  :root {
22
- // the two faces; the baseline dresses both in the typescale's own family
23
- --#{base.$prefix}-ref-typeface-brand: #{map.get(map.get(v.$typescale, 'headline-small'), 'font-family')};
24
- --#{base.$prefix}-ref-typeface-plain: #{map.get(map.get(v.$typescale, 'body-medium'), 'font-family')};
10
+ --#{base.$prefix}-ref-typeface-brand: #{map.get(map.get(v.$typescale, 'headline-small'), 'font-family')};
11
+ --#{base.$prefix}-ref-typeface-plain: #{map.get(map.get(v.$typescale, 'body-medium'), 'font-family')};
25
12
 
26
- // the shape scale, every step of it
27
- @each $step, $radius in v.$shape {
28
- --#{base.$prefix}-sys-shape-corner-#{$step}: #{$radius};
29
- }
13
+ @each $step, $radius in v.$shape {
14
+ --#{base.$prefix}-sys-shape-corner-#{$step}: #{$radius};
15
+ }
30
16
 
31
- // the typescale, every role (or the body subset, when the base configures it)
32
- @include scale.tokens($typescale-tokens);
17
+ @include scale.tokens($typescale-tokens);
33
18
  }
@@ -1,7 +1,3 @@
1
- // The typescale custom properties, one mixin so the full stylesheet, the base
2
- // and material/styles/typography emit the same declarations.
3
- // `all` is every role. `body` is the three body-medium tokens the base body
4
- // rule reads; the other 72 leave the base.
5
1
 
6
2
  @use 'sass:map';
7
3
  @use '../abstract/base' as base;
@@ -9,16 +5,16 @@
9
5
  @use '../abstract/functions' as f;
10
6
 
11
7
  @mixin tokens($which) {
12
- @each $role, $spec in v.$typescale {
13
- $all: $which == 'all';
14
- @if $all or $role == 'body-medium' {
15
- --#{base.$prefix}-sys-typescale-#{$role}-font: var(--#{base.$prefix}-ref-typeface-#{f.typeface($role)});
16
- --#{base.$prefix}-sys-typescale-#{$role}-font-size: #{map.get($spec, 'font-size')};
17
- --#{base.$prefix}-sys-typescale-#{$role}-line-height: #{map.get($spec, 'line-height')};
18
- }
19
- @if $all {
20
- --#{base.$prefix}-sys-typescale-#{$role}-letter-spacing: #{map.get($spec, 'letter-spacing')};
21
- --#{base.$prefix}-sys-typescale-#{$role}-font-weight: #{map.get($spec, 'font-weight')};
22
- }
23
- }
8
+ @each $role, $spec in v.$typescale {
9
+ $all: $which == 'all';
10
+ @if $all or $role == 'body-medium' {
11
+ --#{base.$prefix}-sys-typescale-#{$role}-font: var(--#{base.$prefix}-ref-typeface-#{f.typeface($role)});
12
+ --#{base.$prefix}-sys-typescale-#{$role}-font-size: #{map.get($spec, 'font-size')};
13
+ --#{base.$prefix}-sys-typescale-#{$role}-line-height: #{map.get($spec, 'line-height')};
14
+ }
15
+ @if $all {
16
+ --#{base.$prefix}-sys-typescale-#{$role}-letter-spacing: #{map.get($spec, 'letter-spacing')};
17
+ --#{base.$prefix}-sys-typescale-#{$role}-font-weight: #{map.get($spec, 'font-weight')};
18
+ }
19
+ }
24
20
  }
@@ -1,99 +1,90 @@
1
- // src/styles/base/_typography.scss
2
1
  @use '../abstract/base' as base;
3
2
  @use '../abstract/variables' as v;
4
3
  @use '../abstract/mixins' as m;
5
4
 
6
- // Typography scale classes
7
5
  $prefix: base.$prefix;
8
6
 
9
- // The typescale classes, one per role of the same map the tokens come from,
10
- // each reading its role's custom properties rather than fixed values, so a
11
- // typeface or size set on the tokens reaches them
12
7
  @each $role, $spec in v.$typescale {
13
- .#{$prefix}-#{$role} {
14
- @include m.typescale($role);
15
- }
8
+ .#{$prefix}-#{$role} {
9
+ @include m.typescale($role);
10
+ }
16
11
  }
17
12
 
18
- // Convenience modifiers
19
13
  .#{$prefix}-text-center {
20
- text-align: center;
14
+ text-align: center;
21
15
  }
22
16
 
23
17
  .#{$prefix}-text-left {
24
- text-align: left;
18
+ text-align: left;
25
19
  }
26
20
 
27
21
  .#{$prefix}-text-right {
28
- text-align: right;
22
+ text-align: right;
29
23
  }
30
24
 
31
- // Font weight modifiers
32
25
  .#{$prefix}-font-thin {
33
- font-weight: 100;
26
+ font-weight: 100;
34
27
  }
35
28
 
36
29
  .#{$prefix}-font-light {
37
- font-weight: 300;
30
+ font-weight: 300;
38
31
  }
39
32
 
40
33
  .#{$prefix}-font-regular {
41
- font-weight: 400;
34
+ font-weight: 400;
42
35
  }
43
36
 
44
37
  .#{$prefix}-font-medium {
45
- font-weight: 500;
38
+ font-weight: 500;
46
39
  }
47
40
 
48
41
  .#{$prefix}-font-bold {
49
- font-weight: 700;
42
+ font-weight: 700;
50
43
  }
51
44
 
52
- // Text truncation with ellipsis
53
45
  .#{$prefix}-truncate {
54
- @include m.truncate;
46
+ @include m.truncate;
55
47
  }
56
48
 
57
49
  .#{$prefix}-truncate-2 {
58
- @include m.truncate(2);
50
+ @include m.truncate(2);
59
51
  }
60
52
 
61
53
  .#{$prefix}-truncate-3 {
62
- @include m.truncate(3);
54
+ @include m.truncate(3);
63
55
  }
64
56
 
65
- // Set base styles for heading elements
66
57
  h1 {
67
- @include m.typescale('headline-large');
68
- margin-bottom: 0.5em;
58
+ @include m.typescale('headline-large');
59
+ margin-bottom: 0.5em;
69
60
  }
70
61
 
71
62
  h2 {
72
- @include m.typescale('headline-medium');
73
- margin-bottom: 0.5em;
63
+ @include m.typescale('headline-medium');
64
+ margin-bottom: 0.5em;
74
65
  }
75
66
 
76
67
  h3 {
77
- @include m.typescale('headline-small');
78
- margin-bottom: 0.5em;
68
+ @include m.typescale('headline-small');
69
+ margin-bottom: 0.5em;
79
70
  }
80
71
 
81
72
  h4 {
82
- @include m.typescale('title-large');
83
- margin-bottom: 0.5em;
73
+ @include m.typescale('title-large');
74
+ margin-bottom: 0.5em;
84
75
  }
85
76
 
86
77
  h5 {
87
- @include m.typescale('title-medium');
88
- margin-bottom: 0.5em;
78
+ @include m.typescale('title-medium');
79
+ margin-bottom: 0.5em;
89
80
  }
90
81
 
91
82
  h6 {
92
- @include m.typescale('title-small');
93
- margin-bottom: 0.5em;
83
+ @include m.typescale('title-small');
84
+ margin-bottom: 0.5em;
94
85
  }
95
86
 
96
87
  p {
97
- @include m.typescale('body-medium');
98
- margin-bottom: 1em;
88
+ @include m.typescale('body-medium');
89
+ margin-bottom: 1em;
99
90
  }