@rossigee/clarity-ui 18.2.1-fixed

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 (219) hide show
  1. package/README.md +29 -0
  2. package/STYLES.md +1796 -0
  3. package/accordion/_accordion.clarity.scss +81 -0
  4. package/accordion/_properties.accordion.scss +45 -0
  5. package/accordion/_variables.accordion.scss +91 -0
  6. package/button/_buttons.clarity.scss +374 -0
  7. package/button/_mixins.buttons.scss +232 -0
  8. package/button/_properties.buttons.scss +325 -0
  9. package/button/_properties.toggles.scss +35 -0
  10. package/button/_variables.buttons.scss +843 -0
  11. package/button/_variables.toggles.scss +41 -0
  12. package/button/button-group/_button-group.clarity.scss +193 -0
  13. package/clr-ui.css +31728 -0
  14. package/clr-ui.css.map +1 -0
  15. package/clr-ui.min.css +52 -0
  16. package/clr-ui.min.css.map +1 -0
  17. package/collapsible-panel/_mixins.collapsible-panel.scss +189 -0
  18. package/collapsible-panel/_properties.collapsible-panel.scss +42 -0
  19. package/collapsible-panel/_variables.collapsible-panel.scss +40 -0
  20. package/data/_mixins.tables.scss +111 -0
  21. package/data/_properties.tables.scss +62 -0
  22. package/data/_tables.clarity.scss +120 -0
  23. package/data/_variables.tables.scss +42 -0
  24. package/data/datagrid/_datagrid.clarity.scss +1753 -0
  25. package/data/datagrid/_mixins.datagrid.scss +102 -0
  26. package/data/datagrid/_properties.datagrid.scss +90 -0
  27. package/data/datagrid/_variables.datagrid.scss +96 -0
  28. package/data/stack-view/_properties.stack-view.scss +50 -0
  29. package/data/stack-view/_stack-view.clarity.scss +267 -0
  30. package/data/stack-view/_variables.stack-view.scss +32 -0
  31. package/data/tree-view/_properties.tree-view.scss +41 -0
  32. package/data/tree-view/_tree-view.clarity.scss +281 -0
  33. package/data/tree-view/_variables.tree-view.scss +51 -0
  34. package/emphasis/alert/_alert.clarity.scss +467 -0
  35. package/emphasis/alert/_mixins.alert.scss +96 -0
  36. package/emphasis/alert/_properties.alert.scss +183 -0
  37. package/emphasis/alert/_variables.alert.scss +502 -0
  38. package/emphasis/badge/_badges.clarity.scss +61 -0
  39. package/emphasis/badge/_mixins.bades.scss +34 -0
  40. package/emphasis/badge/_properties.badges.scss +82 -0
  41. package/emphasis/badge/_variables.badges.scss +160 -0
  42. package/emphasis/label/_labels.clarity.scss +175 -0
  43. package/emphasis/label/_mixins.label.scss +76 -0
  44. package/emphasis/label/_properties.label.scss +105 -0
  45. package/emphasis/label/_variables.label.scss +181 -0
  46. package/forms/combobox/_combobox.clarity.scss +322 -0
  47. package/forms/combobox/_properties.combobox.scss +45 -0
  48. package/forms/combobox/_variables.combobox.scss +32 -0
  49. package/forms/datepicker/_datepicker.clarity.scss +259 -0
  50. package/forms/datepicker/_mixins.datepicker.scss +90 -0
  51. package/forms/datepicker/_properties.datepicker.scss +46 -0
  52. package/forms/datepicker/_variables.datepicker.scss +74 -0
  53. package/forms/styles/_checkbox.clarity.scss +193 -0
  54. package/forms/styles/_containers.clarity.scss +228 -0
  55. package/forms/styles/_datalist.clarity.scss +47 -0
  56. package/forms/styles/_file-input.clarity.scss +134 -0
  57. package/forms/styles/_file.clarity.scss +52 -0
  58. package/forms/styles/_form.clarity.scss +87 -0
  59. package/forms/styles/_input-group.clarity.scss +118 -0
  60. package/forms/styles/_input.clarity.scss +78 -0
  61. package/forms/styles/_mixins.forms.scss +173 -0
  62. package/forms/styles/_number-input.clarity.scss +58 -0
  63. package/forms/styles/_password.clarity.scss +26 -0
  64. package/forms/styles/_properties.forms.scss +121 -0
  65. package/forms/styles/_radio.clarity.scss +120 -0
  66. package/forms/styles/_range.clarity.scss +124 -0
  67. package/forms/styles/_select.clarity.scss +178 -0
  68. package/forms/styles/_textarea.clarity.scss +77 -0
  69. package/forms/styles/_toggles.clarity.scss +209 -0
  70. package/forms/styles/_variables.forms.scss +128 -0
  71. package/icon/icon.component.scss +242 -0
  72. package/image/_icons.clarity.scss +101 -0
  73. package/image/_images.clarity.scss +42 -0
  74. package/image/_mixins.images.scss +11 -0
  75. package/layout/_card.clarity.scss +311 -0
  76. package/layout/_login.clarity.scss +240 -0
  77. package/layout/_properties.card.scss +36 -0
  78. package/layout/_properties.login.scss +32 -0
  79. package/layout/_variables.card.scss +23 -0
  80. package/layout/_variables.login.scss +22 -0
  81. package/layout/breadcrumbs/_breadcrumbs.clarity.scss +60 -0
  82. package/layout/breadcrumbs/_properties.breadcrumbs.scss +18 -0
  83. package/layout/breadcrumbs/_variables.breadcrumbs.scss +11 -0
  84. package/layout/grid/_grid.scss +23 -0
  85. package/layout/grid/grid/_grid.scss +39 -0
  86. package/layout/grid/mixins/_breakpoint.scss +83 -0
  87. package/layout/grid/mixins/_clearfix.scss +13 -0
  88. package/layout/grid/mixins/_grid-framework.scss +91 -0
  89. package/layout/grid/mixins/_grid.scss +39 -0
  90. package/layout/grid/utilities/_align.scss +30 -0
  91. package/layout/grid/utilities/_clearfix.scss +12 -0
  92. package/layout/grid/utilities/_display.scss +18 -0
  93. package/layout/grid/utilities/_flex.scss +222 -0
  94. package/layout/grid/utilities/_float.scss +26 -0
  95. package/layout/grid/utilities/_visibility.scss +60 -0
  96. package/layout/main-container/_layout.clarity.scss +87 -0
  97. package/layout/main-container/_properties.header.scss +39 -0
  98. package/layout/main-container/_variables.header.scss +32 -0
  99. package/layout/nav/_header.clarity.scss +40 -0
  100. package/layout/nav/_links.clarity.scss +84 -0
  101. package/layout/nav/_mixins.header.scss +332 -0
  102. package/layout/nav/_mixins.responsive-nav.scss +75 -0
  103. package/layout/nav/_nav.clarity.scss +100 -0
  104. package/layout/nav/_properties.nav.scss +27 -0
  105. package/layout/nav/_properties.responsive-nav.scss +23 -0
  106. package/layout/nav/_properties.subnav.scss +19 -0
  107. package/layout/nav/_responsive-nav.clarity.scss +488 -0
  108. package/layout/nav/_subnav.clarity.scss +48 -0
  109. package/layout/nav/_variables.nav.scss +13 -0
  110. package/layout/nav/_variables.responsive-nav.scss +28 -0
  111. package/layout/nav/_variables.subnav.scss +21 -0
  112. package/layout/tabs/_mixins.tabs.scss +41 -0
  113. package/layout/tabs/_properties.tabs.scss +25 -0
  114. package/layout/tabs/_tabs.clarity.scss +110 -0
  115. package/layout/tabs/_variables.tabs.scss +17 -0
  116. package/layout/vertical-nav/_mixins.vertical-nav.scss +52 -0
  117. package/layout/vertical-nav/_properties.vertical-nav.scss +73 -0
  118. package/layout/vertical-nav/_variables.vertical-nav.scss +52 -0
  119. package/layout/vertical-nav/_vertical-nav.clarity.scss +469 -0
  120. package/main.scss +14 -0
  121. package/modal/_modal.clarity.scss +362 -0
  122. package/modal/_properties.modal.scss +45 -0
  123. package/modal/_variables.modal.scss +38 -0
  124. package/package.json +15 -0
  125. package/popover/common/_popover.clarity.scss +28 -0
  126. package/popover/dropdown/_dropdown.clarity.scss +326 -0
  127. package/popover/dropdown/_menu-mixins.clarity.scss +132 -0
  128. package/popover/dropdown/_properties.dropdown.scss +50 -0
  129. package/popover/dropdown/_variables.dropdown.scss +36 -0
  130. package/popover/signpost/_properties.signpost.scss +34 -0
  131. package/popover/signpost/_signposts.clarity.scss +414 -0
  132. package/popover/signpost/_variables.signpost.scss +21 -0
  133. package/popover/tooltip/_mixins.tooltip.scss +186 -0
  134. package/popover/tooltip/_properties.tooltip.scss +28 -0
  135. package/popover/tooltip/_tooltips.clarity.scss +122 -0
  136. package/popover/tooltip/_variables.tooltip.scss +20 -0
  137. package/progress/progress-bars/_progress-bars.clarity.scss +616 -0
  138. package/progress/progress-bars/_properties.progress-bars.scss +24 -0
  139. package/progress/progress-bars/_variables.progress-bars.scss +15 -0
  140. package/progress/progress-bars/utils/_mixins.clarity.scss +18 -0
  141. package/progress/spinner/_mixins.spinner.scss +30 -0
  142. package/progress/spinner/_properties.spinner.scss +37 -0
  143. package/progress/spinner/_spinner.clarity.scss +148 -0
  144. package/progress/spinner/_variables.spinner.scss +25 -0
  145. package/stepper/_properties.stepper.scss +29 -0
  146. package/stepper/_stepper.clarity.scss +184 -0
  147. package/stepper/_variables.stepper.scss +13 -0
  148. package/styles/_a11y.scss +14 -0
  149. package/styles/_close.clarity.scss +60 -0
  150. package/styles/_components.clarity.scss +183 -0
  151. package/styles/_mixins.scss +478 -0
  152. package/styles/_normalize.scss +292 -0
  153. package/styles/_reboot.clarity.scss +374 -0
  154. package/styles/_variables.clarity.scss +139 -0
  155. package/styles/core/base/base.element.scss +97 -0
  156. package/styles/core/global.scss +12 -0
  157. package/styles/core/layout/_alignments.scss +18 -0
  158. package/styles/core/layout/_container.scss +29 -0
  159. package/styles/core/layout/_display.scss +58 -0
  160. package/styles/core/layout/_optimize.scss +60 -0
  161. package/styles/core/layout/_shadow-dom.scss +47 -0
  162. package/styles/core/layout/_spacing.scss +31 -0
  163. package/styles/core/layout/_type-grid.scss +66 -0
  164. package/styles/core/layout/_type-horizontal.scss +33 -0
  165. package/styles/core/layout/_type-vertical.scss +26 -0
  166. package/styles/core/layout/mixins/_mixins.alignment.scss +35 -0
  167. package/styles/core/layout/mixins/_mixins.display.scss +23 -0
  168. package/styles/core/layout/mixins/_mixins.grid.scss +105 -0
  169. package/styles/core/layout/mixins/_mixins.scss +106 -0
  170. package/styles/core/layout/mixins/_mixins.shadow-dom.scss +106 -0
  171. package/styles/core/layout/mixins/_mixins.type-horizontal.scss +113 -0
  172. package/styles/core/layout/mixins/_mixins.type-vertical.scss +108 -0
  173. package/styles/core/module.layout.scss +22 -0
  174. package/styles/core/module.reset.scss +48 -0
  175. package/styles/core/module.typography.scss +9 -0
  176. package/styles/core/theme.dark.scss +266 -0
  177. package/styles/core/theme.high-contrast.scss +42 -0
  178. package/styles/core/theme.low-motion.scss +20 -0
  179. package/styles/core/tokens/_alias-interaction.scss +59 -0
  180. package/styles/core/tokens/_alias-object-background.scss +14 -0
  181. package/styles/core/tokens/_alias-object-border.scss +21 -0
  182. package/styles/core/tokens/_alias-object-container.scss +20 -0
  183. package/styles/core/tokens/_alias-object-opacity.scss +15 -0
  184. package/styles/core/tokens/_alias-object-shadow.scss +17 -0
  185. package/styles/core/tokens/_alias-status.scss +34 -0
  186. package/styles/core/tokens/_alias-typography.scss +101 -0
  187. package/styles/core/tokens/_alias-utility.scss +38 -0
  188. package/styles/core/tokens/_alias-viz-colors.scss +170 -0
  189. package/styles/core/tokens/_global-animation.scss +32 -0
  190. package/styles/core/tokens/_global-colors.scss +249 -0
  191. package/styles/core/tokens/_global-space.scss +52 -0
  192. package/styles/core/tokens/_internal-scale.scss +14 -0
  193. package/styles/core/tokens/_properties.tokens.scss +21 -0
  194. package/styles/core/tokens/_variables.tokens.scss +770 -0
  195. package/styles/core/typography/_legacy-typography.scss +328 -0
  196. package/styles/core/typography/_mixins.typography.scss +18 -0
  197. package/styles/core/typography/_typography.scss +321 -0
  198. package/styles/variables/_properties.density.scss +223 -0
  199. package/styles/variables/_properties.global.scss +51 -0
  200. package/styles/variables/_properties.layout.scss +21 -0
  201. package/styles/variables/_properties.scss +11 -0
  202. package/styles/variables/_properties.typography.scss +164 -0
  203. package/styles/variables/_variables.density.scss +114 -0
  204. package/styles/variables/_variables.global.scss +82 -0
  205. package/styles/variables/_variables.layout.scss +37 -0
  206. package/styles/variables/_variables.scss +11 -0
  207. package/styles/variables/_variables.typography.scss +156 -0
  208. package/timeline/_properties.timeline.scss +38 -0
  209. package/timeline/_timeline.clarity.scss +172 -0
  210. package/timeline/_variables.timeline.scss +29 -0
  211. package/typography/_code.scss +36 -0
  212. package/typography/_font-metropolis.scss +45 -0
  213. package/typography/_lists.scss +81 -0
  214. package/typography/_typography.scss +322 -0
  215. package/utils/animations/_animations.clarity.scss +44 -0
  216. package/utils/animations/_mixins.animations.scss +33 -0
  217. package/wizard/_properties.wizard.scss +53 -0
  218. package/wizard/_variables.wizard.scss +58 -0
  219. package/wizard/_wizard.clarity.scss +688 -0
@@ -0,0 +1,328 @@
1
+ /*
2
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
3
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
4
+ * This software is released under MIT license.
5
+ * The full license information can be found in LICENSE in the root directory of this project.
6
+ */
7
+
8
+ @use '../../mixins';
9
+ @use '../typography/mixins.typography' as typography-mixins;
10
+
11
+ $typography-h0-font-size: 2rem;
12
+ $typography-h0-font-size-static: 2rem;
13
+ $typography-h0-font-weight: 200;
14
+ $typography-h0-font-weight-static: 200;
15
+ $typography-h0-letter-spacing: -0.0125em;
16
+ $typography-h0-letter-spacing-static: -0.0125em;
17
+ $typography-h0-line-height: 1.2em;
18
+ $typography-h0-line-height-static: 1.2em;
19
+ $typography-h1-font-size: 1.6rem;
20
+ $typography-h1-font-size-static: 1.6rem;
21
+ $typography-h1-font-weight: 200;
22
+ $typography-h1-font-weight-static: 200;
23
+ $typography-h1-letter-spacing: -0.0156em;
24
+ $typography-h1-letter-spacing-static: -0.0156em;
25
+ $typography-h1-line-height: 1.5em;
26
+ $typography-h1-line-height-static: 1.5em;
27
+ $typography-h2-font-size: 1.4rem;
28
+ $typography-h2-font-size-static: 1.4rem;
29
+ $typography-h2-font-weight: 200;
30
+ $typography-h2-font-weight-static: 200;
31
+ $typography-h2-letter-spacing: -0.017857em;
32
+ $typography-h2-letter-spacing-static: -0.017857em;
33
+ $typography-h2-line-height: 1.7143em;
34
+ $typography-h2-line-height-static: 1.7143em;
35
+ $typography-h3-font-size: 1.1rem;
36
+ $typography-h3-font-size-static: 1.1rem;
37
+ $typography-h3-font-weight: 200;
38
+ $typography-h3-font-weight-static: 200;
39
+ $typography-h3-letter-spacing: -0.013636em;
40
+ $typography-h3-letter-spacing-static: -0.013636em;
41
+ $typography-h3-line-height: 1.0909em;
42
+ $typography-h3-line-height-static: 1.0909em;
43
+ $typography-h4-font-size: 0.9rem;
44
+ $typography-h4-font-size-static: 0.9rem;
45
+ $typography-h4-font-weight: 200;
46
+ $typography-h4-font-weight-static: 200;
47
+ $typography-h4-letter-spacing: -0.011111em;
48
+ $typography-h4-letter-spacing-static: -0.011111em;
49
+ $typography-h4-line-height: 1.333333em;
50
+ $typography-h4-line-height-static: 1.333333em;
51
+ $typography-h5-font-size: 0.8rem;
52
+ $typography-h5-font-size-static: 0.8rem;
53
+ $typography-h5-font-weight: 400;
54
+ $typography-h5-font-weight-static: 400;
55
+ $typography-h5-letter-spacing: -0.0125em;
56
+ $typography-h5-letter-spacing-static: -0.0125em;
57
+ $typography-h5-line-height: 1.5em;
58
+ $typography-h5-line-height-static: 1.5em;
59
+ $typography-h6-font-size: 0.7rem;
60
+ $typography-h6-font-size-static: 0.7rem;
61
+ $typography-h6-font-weight: 500;
62
+ $typography-h6-font-weight-static: 500;
63
+ $typography-h6-letter-spacing: -0.03125em;
64
+ $typography-h6-letter-spacing-static: -0.03125em;
65
+ $typography-h6-line-height: 1.5em;
66
+ $typography-h6-line-height-static: 1.5em;
67
+ $typography-header-font-family: var(
68
+ --cds-alias-typography-header-font-family,
69
+ 'Clarity City',
70
+ 'Avenir Next',
71
+ sans-serif
72
+ );
73
+ $typography-p0-font-size: 1.2rem;
74
+ $typography-p0-font-size-static: 1.2rem;
75
+ $typography-p0-font-weight: 400;
76
+ $typography-p0-font-weight-static: 400;
77
+ $typography-p0-letter-spacing: -0.008333em;
78
+ $typography-p0-letter-spacing-static: -0.008333em;
79
+ $typography-p0-line-height: 1.16667em;
80
+ $typography-p0-line-height-static: 1.16667em;
81
+ $typography-p1-font-size: 0.7rem;
82
+ $typography-p1-font-size-static: 0.7rem;
83
+ $typography-p1-font-weight: 400;
84
+ $typography-p1-font-weight-static: 400;
85
+ $typography-p1-letter-spacing: -0.014286em;
86
+ $typography-p1-letter-spacing-static: -0.014286em;
87
+ $typography-p1-line-height: 1.71429em;
88
+ $typography-p1-line-height-static: 1.71429em;
89
+ $typography-p2-font-size: 0.65rem;
90
+ $typography-p2-font-size-static: 0.65rem;
91
+ $typography-p2-font-weight: 500;
92
+ $typography-p2-font-weight-static: 500;
93
+ $typography-p2-letter-spacing: -0.007692em;
94
+ $typography-p2-letter-spacing-static: -0.007692em;
95
+ $typography-p2-line-height: 1.84615em;
96
+ $typography-p2-line-height-static: 1.84615em;
97
+ $typography-p3-font-size: 0.65rem;
98
+ $typography-p3-font-size-static: 0.65rem;
99
+ $typography-p3-font-weight: 400;
100
+ $typography-p3-font-weight-static: 400;
101
+ $typography-p3-letter-spacing: -0.007692em;
102
+ $typography-p3-letter-spacing-static: -0.007692em;
103
+ $typography-p3-line-height: 1.84615em;
104
+ $typography-p3-line-height-static: 1.84615em;
105
+ $typography-p4-font-size: 0.6rem;
106
+ $typography-p4-font-size-static: 0.6rem;
107
+ $typography-p4-font-weight: 600;
108
+ $typography-p4-font-weight-static: 600;
109
+ $typography-p4-letter-spacing: -0.008333em;
110
+ $typography-p4-letter-spacing-static: -0.008333em;
111
+ $typography-p4-line-height: 2em;
112
+ $typography-p4-line-height-static: 2em;
113
+ $typography-p5-font-size: 0.6rem;
114
+ $typography-p5-font-size-static: 0.6rem;
115
+ $typography-p5-font-weight: 400;
116
+ $typography-p5-font-weight-static: 400;
117
+ $typography-p5-letter-spacing: -0.008333em;
118
+ $typography-p5-letter-spacing-static: -0.008333em;
119
+ $typography-p5-line-height: 2em;
120
+ $typography-p5-line-height-static: 2em;
121
+ $typography-p6-font-size: 0.55rem;
122
+ $typography-p6-font-size-static: 0.55rem;
123
+ $typography-p6-font-weight: 600;
124
+ $typography-p6-font-weight-static: 600;
125
+ $typography-p6-letter-spacing: 0.018182em;
126
+ $typography-p6-letter-spacing-static: 0.018182em;
127
+ $typography-p6-line-height: 1.090909em;
128
+ $typography-p6-line-height-static: 1.090909em;
129
+ $typography-p7-font-size: 0.55rem;
130
+ $typography-p7-font-size-static: 0.55rem;
131
+ $typography-p7-font-weight: 400;
132
+ $typography-p7-font-weight-static: 400;
133
+ $typography-p7-letter-spacing: 0.018182em;
134
+ $typography-p7-letter-spacing-static: 0.018182em;
135
+ $typography-p7-line-height: 1.090909em;
136
+ $typography-p7-line-height-static: 1.090909em;
137
+ $typography-p8-font-size: 0.5rem;
138
+ $typography-p8-font-size-static: 0.5rem;
139
+ $typography-p8-font-weight: 400;
140
+ $typography-p8-font-weight-static: 400;
141
+ $typography-p8-letter-spacing: 0.02em;
142
+ $typography-p8-letter-spacing-static: 0.02em;
143
+ $typography-p8-line-height: 1.2em;
144
+ $typography-p8-line-height-static: 1.2em;
145
+
146
+ // LEGACY FONT STYLES
147
+ [cds-text*='h0'] {
148
+ $lh-gap: mixins.getLineHeightGap($typography-h0-line-height-static, $typography-h0-line-height);
149
+ @include typography-mixins.LHE($lh-gap);
150
+
151
+ font-family: $typography-header-font-family;
152
+ font-size: $typography-h0-font-size;
153
+ font-weight: $typography-h0-font-weight;
154
+ color: var(--cds-alias-typography-color-400);
155
+ line-height: $typography-h0-line-height;
156
+ letter-spacing: $typography-h0-letter-spacing;
157
+ }
158
+
159
+ [cds-text*='h1'] {
160
+ $lh-gap: mixins.getLineHeightGap($typography-h1-line-height-static, $typography-h1-line-height);
161
+ @include typography-mixins.LHE($lh-gap);
162
+
163
+ font-family: $typography-header-font-family;
164
+ font-size: $typography-h1-font-size;
165
+ font-weight: $typography-h1-font-weight;
166
+ color: var(--cds-alias-typography-color-400);
167
+ line-height: $typography-h1-line-height;
168
+ letter-spacing: $typography-h1-letter-spacing;
169
+ }
170
+
171
+ [cds-text*='h2'] {
172
+ $lh-gap: mixins.getLineHeightGap($typography-h2-line-height-static, $typography-h2-line-height);
173
+ @include typography-mixins.LHE($lh-gap);
174
+
175
+ font-family: $typography-header-font-family;
176
+ font-size: $typography-h2-font-size;
177
+ font-weight: $typography-h2-font-weight;
178
+ color: var(--cds-alias-typography-color-400);
179
+ line-height: $typography-h2-line-height;
180
+ letter-spacing: $typography-h2-letter-spacing;
181
+ }
182
+
183
+ [cds-text*='h3'] {
184
+ $lh-gap: mixins.getLineHeightGap($typography-h3-line-height-static, $typography-h3-line-height);
185
+ @include typography-mixins.LHE($lh-gap);
186
+
187
+ font-family: $typography-header-font-family;
188
+ font-size: $typography-h3-font-size;
189
+ font-weight: $typography-h3-font-weight;
190
+ color: var(--cds-alias-typography-color-400);
191
+ line-height: $typography-h3-line-height;
192
+ letter-spacing: $typography-h3-letter-spacing;
193
+ }
194
+
195
+ [cds-text*='h4'] {
196
+ $lh-gap: mixins.getLineHeightGap($typography-h4-line-height-static, $typography-h4-line-height);
197
+ @include typography-mixins.LHE($lh-gap);
198
+
199
+ font-family: $typography-header-font-family;
200
+ font-size: $typography-h4-font-size;
201
+ font-weight: $typography-h4-font-weight;
202
+ color: var(--cds-alias-typography-color-400);
203
+ line-height: $typography-h4-line-height;
204
+ letter-spacing: $typography-h4-letter-spacing;
205
+ }
206
+
207
+ [cds-text*='h5'] {
208
+ $lh-gap: mixins.getLineHeightGap($typography-h5-line-height-static, $typography-h5-line-height);
209
+ @include typography-mixins.LHE($lh-gap);
210
+
211
+ font-family: $typography-header-font-family;
212
+ font-size: $typography-h5-font-size;
213
+ font-weight: $typography-h5-font-weight;
214
+ color: var(--cds-alias-typography-color-400);
215
+ line-height: $typography-h5-line-height;
216
+ letter-spacing: $typography-h5-letter-spacing;
217
+ }
218
+
219
+ [cds-text*='h6'] {
220
+ $lh-gap: mixins.getLineHeightGap($typography-h6-line-height-static, $typography-h6-line-height);
221
+ @include typography-mixins.LHE($lh-gap);
222
+
223
+ font-family: $typography-header-font-family;
224
+ font-size: $typography-h6-font-size;
225
+ font-weight: $typography-h6-font-weight;
226
+ color: var(--cds-alias-typography-color-400);
227
+ line-height: $typography-h6-line-height;
228
+ letter-spacing: $typography-h6-letter-spacing;
229
+ }
230
+
231
+ [cds-text*='p0'] {
232
+ $lh-gap: mixins.getLineHeightGap($typography-p0-line-height-static, $typography-p0-line-height);
233
+ @include typography-mixins.LHE($lh-gap);
234
+
235
+ font-size: $typography-p0-font-size;
236
+ font-weight: $typography-p0-font-weight;
237
+ color: var(--cds-alias-typography-color-500);
238
+ line-height: $typography-p0-line-height;
239
+ letter-spacing: $typography-p0-letter-spacing;
240
+ }
241
+
242
+ [cds-text*='p1'] {
243
+ $lh-gap: mixins.getLineHeightGap($typography-p1-line-height-static, $typography-p1-line-height);
244
+ @include typography-mixins.LHE($lh-gap);
245
+
246
+ font-size: $typography-p1-font-size;
247
+ font-weight: $typography-p1-font-weight;
248
+ color: var(--cds-alias-typography-color-400);
249
+ line-height: $typography-p1-line-height;
250
+ letter-spacing: $typography-p1-letter-spacing;
251
+ }
252
+
253
+ [cds-text*='p2'] {
254
+ $lh-gap: mixins.getLineHeightGap($typography-p2-line-height-static, $typography-p2-line-height);
255
+ @include typography-mixins.LHE($lh-gap);
256
+
257
+ font-size: $typography-p2-font-size;
258
+ font-weight: $typography-p2-font-weight;
259
+ color: var(--cds-alias-typography-color-400);
260
+ line-height: $typography-p2-line-height;
261
+ letter-spacing: $typography-p2-letter-spacing;
262
+ }
263
+
264
+ [cds-text*='p3'] {
265
+ $lh-gap: mixins.getLineHeightGap($typography-p3-line-height-static, $typography-p3-line-height);
266
+ @include typography-mixins.LHE($lh-gap);
267
+
268
+ font-size: $typography-p3-font-size;
269
+ font-weight: $typography-p3-font-weight;
270
+ color: var(--cds-alias-typography-color-400);
271
+ line-height: $typography-p3-line-height;
272
+ letter-spacing: $typography-p3-letter-spacing;
273
+ }
274
+
275
+ [cds-text*='p4'] {
276
+ $lh-gap: mixins.getLineHeightGap($typography-p4-line-height-static, $typography-p4-line-height);
277
+ @include typography-mixins.LHE($lh-gap);
278
+
279
+ font-size: $typography-p4-font-size;
280
+ font-weight: $typography-p4-font-weight;
281
+ color: var(--cds-alias-typography-color-400);
282
+ line-height: $typography-p4-line-height;
283
+ letter-spacing: $typography-p4-letter-spacing;
284
+ }
285
+
286
+ [cds-text*='p5'] {
287
+ $lh-gap: mixins.getLineHeightGap($typography-p5-line-height-static, $typography-p5-line-height);
288
+ @include typography-mixins.LHE($lh-gap);
289
+
290
+ font-size: $typography-p5-font-size;
291
+ font-weight: $typography-p5-font-weight;
292
+ color: var(--cds-alias-typography-color-400);
293
+ line-height: $typography-p5-line-height;
294
+ letter-spacing: $typography-p5-letter-spacing;
295
+ }
296
+
297
+ [cds-text*='p6'] {
298
+ $lh-gap: mixins.getLineHeightGap($typography-p6-line-height-static, $typography-p6-line-height);
299
+ @include typography-mixins.LHE($lh-gap);
300
+
301
+ font-size: $typography-p6-font-size;
302
+ font-weight: $typography-p6-font-weight;
303
+ color: var(--cds-alias-typography-color-400);
304
+ line-height: $typography-p6-line-height;
305
+ letter-spacing: $typography-p6-letter-spacing;
306
+ }
307
+
308
+ [cds-text*='p7'] {
309
+ $lh-gap: mixins.getLineHeightGap($typography-p7-line-height-static, $typography-p7-line-height);
310
+ @include typography-mixins.LHE($lh-gap);
311
+
312
+ font-size: $typography-p7-font-size;
313
+ font-weight: $typography-p7-font-weight;
314
+ color: var(--cds-alias-typography-color-400);
315
+ line-height: $typography-p7-line-height;
316
+ letter-spacing: $typography-p7-letter-spacing;
317
+ }
318
+
319
+ [cds-text*='p8'] {
320
+ $lh-gap: mixins.getLineHeightGap($typography-p8-line-height-static, $typography-p8-line-height);
321
+ @include typography-mixins.LHE($lh-gap);
322
+
323
+ font-size: $typography-p8-font-size;
324
+ font-weight: $typography-p8-font-weight;
325
+ color: var(--cds-alias-typography-color-400);
326
+ line-height: $typography-p8-line-height;
327
+ letter-spacing: $typography-p8-letter-spacing;
328
+ }
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
3
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
4
+ * This software is released under MIT license.
5
+ * The full license information can be found in LICENSE in the root directory of this project.
6
+ */
7
+
8
+ @use '../tokens/variables.tokens' as tokens;
9
+ @use '../../mixins';
10
+
11
+ @mixin LHE($lh-gap: 0.5em) {
12
+ @include mixins.line-height-eraser(
13
+ $lh-gap,
14
+ tokens.$cds-alias-typography-top-gap-height,
15
+ tokens.$cds-alias-typography-ascender-height,
16
+ tokens.$cds-alias-typography-x-height
17
+ );
18
+ }
@@ -0,0 +1,321 @@
1
+ /*
2
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
3
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
4
+ * This software is released under MIT license.
5
+ * The full license information can be found in LICENSE in the root directory of this project.
6
+ */
7
+
8
+ @use '../tokens/variables.tokens' as tokens;
9
+ @use '../../mixins';
10
+ @use 'mixins.typography' as typography-mixins;
11
+
12
+ [cds-text] {
13
+ font-family: tokens.$cds-alias-typography-font-family;
14
+ margin-top: 0;
15
+ margin-bottom: 0;
16
+
17
+ // remove as they cause excess gap when combined with cds-layout on the same element
18
+ &[cds-layout~='vertical'],
19
+ &[cds-layout~='horizontal'],
20
+ &[cds-layout~='grid'] {
21
+ &::before,
22
+ &::after {
23
+ display: none;
24
+ }
25
+ }
26
+ }
27
+
28
+ [cds-text*='display'],
29
+ [cds-text*='headline'],
30
+ [cds-text*='title'],
31
+ [cds-text*='section'],
32
+ [cds-text*='subsection'] {
33
+ font-family: tokens.$cds-alias-typography-header-font-family;
34
+ color: tokens.$cds-alias-typography-color-400;
35
+ }
36
+
37
+ [cds-text*='body'],
38
+ [cds-text*='message'],
39
+ [cds-text*='secondary'],
40
+ [cds-text*='caption'],
41
+ [cds-text*='smallcaption'] {
42
+ color: tokens.$cds-alias-typography-color-500;
43
+ }
44
+
45
+ [cds-text*='inline'] {
46
+ width: auto !important;
47
+ display: inline-block !important;
48
+ }
49
+
50
+ [cds-text*='display'] {
51
+ $lh-gap: mixins.getLineHeightGap(
52
+ tokens.$cds-alias-typography-display-line-height-static,
53
+ tokens.$cds-alias-typography-display-line-height
54
+ );
55
+ @include typography-mixins.LHE($lh-gap);
56
+
57
+ font-size: tokens.$cds-alias-typography-display-font-size;
58
+ font-weight: tokens.$cds-alias-typography-display-font-weight;
59
+ line-height: tokens.$cds-alias-typography-display-line-height;
60
+ letter-spacing: tokens.$cds-alias-typography-display-letter-spacing;
61
+ }
62
+
63
+ [cds-text*='headline'] {
64
+ $lh-gap: mixins.getLineHeightGap(
65
+ tokens.$cds-alias-typography-heading-line-height-static,
66
+ tokens.$cds-alias-typography-heading-line-height
67
+ );
68
+ @include typography-mixins.LHE($lh-gap);
69
+
70
+ font-size: tokens.$cds-alias-typography-heading-font-size;
71
+ font-weight: tokens.$cds-alias-typography-heading-font-weight;
72
+ line-height: tokens.$cds-alias-typography-heading-line-height;
73
+ letter-spacing: tokens.$cds-alias-typography-heading-letter-spacing;
74
+ }
75
+
76
+ [cds-text*='title'] {
77
+ $lh-gap: mixins.getLineHeightGap(
78
+ tokens.$cds-alias-typography-title-line-height-static,
79
+ tokens.$cds-alias-typography-title-line-height
80
+ );
81
+ @include typography-mixins.LHE($lh-gap);
82
+
83
+ font-size: tokens.$cds-alias-typography-title-font-size;
84
+ font-weight: tokens.$cds-alias-typography-title-font-weight;
85
+ line-height: tokens.$cds-alias-typography-title-line-height;
86
+ letter-spacing: tokens.$cds-alias-typography-title-letter-spacing;
87
+ }
88
+
89
+ [cds-text*='section'] {
90
+ $lh-gap: mixins.getLineHeightGap(
91
+ tokens.$cds-alias-typography-section-line-height-static,
92
+ tokens.$cds-alias-typography-section-line-height
93
+ );
94
+ @include typography-mixins.LHE($lh-gap);
95
+
96
+ font-size: tokens.$cds-alias-typography-section-font-size;
97
+ font-weight: tokens.$cds-alias-typography-section-font-weight;
98
+ line-height: tokens.$cds-alias-typography-section-line-height;
99
+ letter-spacing: tokens.$cds-alias-typography-section-letter-spacing;
100
+ }
101
+
102
+ [cds-text*='subsection'] {
103
+ $lh-gap: mixins.getLineHeightGap(
104
+ tokens.$cds-alias-typography-subsection-line-height-static,
105
+ tokens.$cds-alias-typography-subsection-line-height
106
+ );
107
+ @include typography-mixins.LHE($lh-gap);
108
+
109
+ font-size: tokens.$cds-alias-typography-subsection-font-size;
110
+ font-weight: tokens.$cds-alias-typography-subsection-font-weight;
111
+ line-height: tokens.$cds-alias-typography-subsection-line-height;
112
+ letter-spacing: tokens.$cds-alias-typography-subsection-letter-spacing;
113
+ }
114
+
115
+ [cds-text*='body'] {
116
+ $lh-gap: mixins.getLineHeightGap(
117
+ tokens.$cds-alias-typography-body-line-height-static,
118
+ tokens.$cds-alias-typography-body-line-height
119
+ );
120
+ @include mixins.line-height-eraser(
121
+ $lh-gap,
122
+ tokens.$cds-alias-typography-top-gap-height,
123
+ tokens.$cds-alias-typography-ascender-height,
124
+ tokens.$cds-alias-typography-x-height,
125
+ 0.1em
126
+ );
127
+
128
+ font-weight: tokens.$cds-alias-typography-body-font-weight;
129
+ font-size: tokens.$cds-alias-typography-body-font-size;
130
+ letter-spacing: tokens.$cds-alias-typography-body-letter-spacing;
131
+ line-height: tokens.$cds-alias-typography-body-line-height;
132
+ }
133
+
134
+ // remove extra margin on the body tag to avoid an unnecessary scrollbar
135
+ body[cds-text*='body'] {
136
+ @include mixins.remove-line-height-erasers;
137
+ }
138
+
139
+ [cds-text*='message'] {
140
+ $lh-gap: mixins.getLineHeightGap(
141
+ tokens.$cds-alias-typography-message-line-height-static,
142
+ tokens.$cds-alias-typography-message-line-height
143
+ );
144
+ @include typography-mixins.LHE($lh-gap);
145
+
146
+ font-size: tokens.$cds-alias-typography-message-font-size;
147
+ font-weight: tokens.$cds-alias-typography-message-font-weight;
148
+ line-height: tokens.$cds-alias-typography-message-line-height;
149
+ letter-spacing: tokens.$cds-alias-typography-message-letter-spacing;
150
+ }
151
+
152
+ [cds-text*='secondary'] {
153
+ $lh-gap: mixins.getLineHeightGap(
154
+ tokens.$cds-alias-typography-secondary-line-height-static,
155
+ tokens.$cds-alias-typography-secondary-line-height
156
+ );
157
+ @include typography-mixins.LHE($lh-gap);
158
+
159
+ font-size: tokens.$cds-alias-typography-secondary-font-size;
160
+ font-weight: tokens.$cds-alias-typography-secondary-font-weight;
161
+ line-height: tokens.$cds-alias-typography-secondary-line-height;
162
+ letter-spacing: tokens.$cds-alias-typography-secondary-letter-spacing;
163
+ }
164
+
165
+ [cds-text*='caption'] {
166
+ $lh-gap: mixins.getLineHeightGap(
167
+ tokens.$cds-alias-typography-caption-line-height-static,
168
+ tokens.$cds-alias-typography-caption-line-height
169
+ );
170
+ @include typography-mixins.LHE($lh-gap);
171
+
172
+ font-size: tokens.$cds-alias-typography-caption-font-size;
173
+ font-weight: tokens.$cds-alias-typography-caption-font-weight;
174
+ line-height: tokens.$cds-alias-typography-caption-line-height;
175
+ letter-spacing: tokens.$cds-alias-typography-caption-letter-spacing;
176
+ }
177
+
178
+ [cds-text*='smallcaption'] {
179
+ $lh-gap: mixins.getLineHeightGap(
180
+ tokens.$cds-alias-typography-smallcaption-line-height-static,
181
+ tokens.$cds-alias-typography-smallcaption-line-height
182
+ );
183
+ @include typography-mixins.LHE($lh-gap);
184
+
185
+ font-size: tokens.$cds-alias-typography-smallcaption-font-size;
186
+ font-weight: tokens.$cds-alias-typography-smallcaption-font-weight;
187
+ line-height: tokens.$cds-alias-typography-smallcaption-line-height;
188
+ letter-spacing: tokens.$cds-alias-typography-smallcaption-letter-spacing;
189
+ }
190
+
191
+ [cds-text~='link'] {
192
+ color: tokens.$cds-alias-typography-link-color !important;
193
+ text-decoration: underline !important;
194
+ line-height: inherit !important;
195
+ font-size: inherit !important;
196
+
197
+ &:focus {
198
+ outline: #{tokens.$cds-alias-object-interaction-outline};
199
+ outline-offset: #{tokens.$cds-alias-object-interaction-outline-offset};
200
+ }
201
+
202
+ &:hover {
203
+ color: tokens.$cds-alias-typography-link-color-hover !important;
204
+ }
205
+
206
+ &:visited:not([cds-text~='static']),
207
+ &[cds-text~='visited'] {
208
+ color: tokens.$cds-alias-typography-link-color-visited !important;
209
+
210
+ &:hover {
211
+ color: tokens.$cds-alias-typography-link-color-visited-hover !important;
212
+ }
213
+ }
214
+ }
215
+
216
+ [cds-text='link']:focus {
217
+ outline: #{tokens.$cds-alias-object-interaction-outline-webkit};
218
+ }
219
+
220
+ [cds-text~='code'] {
221
+ color: tokens.$cds-alias-status-danger;
222
+ font-family: monospace;
223
+ }
224
+
225
+ // font-weight
226
+
227
+ [cds-text~='extrabold'] {
228
+ font-weight: tokens.$cds-alias-typography-font-weight-extrabold !important;
229
+ }
230
+
231
+ [cds-text~='bold'] {
232
+ font-weight: tokens.$cds-alias-typography-font-weight-bold !important;
233
+ }
234
+
235
+ [cds-text~='semibold'] {
236
+ font-weight: tokens.$cds-alias-typography-font-weight-semibold !important;
237
+ }
238
+
239
+ [cds-text~='medium'] {
240
+ font-weight: tokens.$cds-alias-typography-font-weight-medium !important;
241
+ }
242
+
243
+ [cds-text~='regular'] {
244
+ font-weight: tokens.$cds-alias-typography-font-weight-regular !important;
245
+ }
246
+
247
+ [cds-text~='light'] {
248
+ font-weight: tokens.$cds-alias-typography-font-weight-light !important;
249
+ }
250
+
251
+ // transforms
252
+
253
+ [cds-text~='capitalize'] {
254
+ text-transform: capitalize !important;
255
+ }
256
+
257
+ [cds-text~='uppercase'] {
258
+ text-transform: uppercase !important;
259
+ }
260
+
261
+ [cds-text~='lowercase'] {
262
+ text-transform: lowercase !important;
263
+ }
264
+
265
+ // truncation
266
+
267
+ [cds-text~='truncate'] {
268
+ overflow: hidden !important;
269
+ text-overflow: ellipsis !important;
270
+ white-space: nowrap !important;
271
+ @include mixins.remove-line-height-erasers;
272
+ }
273
+
274
+ // alignment
275
+
276
+ [cds-text~='justify'] {
277
+ text-align: justify !important;
278
+ }
279
+
280
+ [cds-text~='left'] {
281
+ text-align: left !important;
282
+ }
283
+
284
+ [cds-text~='right'] {
285
+ text-align: right !important;
286
+ }
287
+
288
+ [cds-text~='center'] {
289
+ text-align: center !important;
290
+ }
291
+
292
+ // monospace
293
+ [cds-text~='monospace'] {
294
+ font-family: tokens.$cds-alias-typography-monospace-font-family;
295
+ }
296
+
297
+ // https://seek-oss.github.io/capsize/
298
+ [cds-text~='lhe'] {
299
+ /* stylelint-disable-next-line meowtec/no-px */
300
+ padding: 0.05px 0;
301
+
302
+ &::before {
303
+ content: '';
304
+ margin-top: -0.124em;
305
+ display: block;
306
+ height: 0;
307
+ }
308
+
309
+ &::after {
310
+ content: '';
311
+ margin-bottom: -0.221em;
312
+ display: block;
313
+ height: 0;
314
+ }
315
+ }
316
+
317
+ // remove line-height eraser from element
318
+ [cds-layout~='disable-lhe'],
319
+ [cds-text~='disable-lhe'] {
320
+ @include mixins.remove-line-height-erasers;
321
+ }