opui-css 3.3.5 → 4.0.0

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 (174) hide show
  1. package/CHANGELOG.md +235 -0
  2. package/LICENSE +21 -21
  3. package/MIGRATING.md +105 -0
  4. package/README.md +66 -29
  5. package/astro/index.ts +46 -0
  6. package/components/AGENTS.md +247 -0
  7. package/components/Accordion/Accordion.astro +42 -0
  8. package/components/Anchor/Anchor.astro +51 -0
  9. package/components/Avatar/Avatar.astro +44 -0
  10. package/components/Badge/Badge.astro +54 -0
  11. package/components/Button/Button.astro +45 -0
  12. package/components/ButtonGroup/ButtonGroup.astro +29 -0
  13. package/components/Callout/Callout.astro +75 -0
  14. package/components/Card/Card.astro +38 -0
  15. package/components/Checkbox/Checkbox.astro +76 -0
  16. package/components/Checkbox/CheckboxInput.astro +32 -0
  17. package/components/Chip/Chip.astro +37 -0
  18. package/components/ClassicSelect/ClassicSelect.astro +83 -0
  19. package/components/DescriptionList/Description.astro +12 -0
  20. package/components/DescriptionList/DescriptionList.astro +22 -0
  21. package/components/DescriptionList/Item.astro +12 -0
  22. package/components/DescriptionList/Term.astro +12 -0
  23. package/components/DescriptionList/index.ts +12 -0
  24. package/components/Dialog/Dialog.astro +43 -0
  25. package/components/Divider/Divider.astro +14 -0
  26. package/components/Drawer/Drawer.astro +49 -0
  27. package/components/Drawer/DrawerFooter.astro +14 -0
  28. package/components/Drawer/DrawerHeader.astro +31 -0
  29. package/components/FieldDescription/FieldDescription.astro +13 -0
  30. package/components/FieldGroup/FieldGroup.astro +31 -0
  31. package/components/FieldLegend/FieldLegend.astro +15 -0
  32. package/components/FieldSet/FieldSet.astro +15 -0
  33. package/components/Form/Form.astro +15 -0
  34. package/components/IconButton/IconButton.astro +26 -0
  35. package/components/List/List.astro +36 -0
  36. package/components/ListItem/ListItem.astro +118 -0
  37. package/components/Progress/Progress.astro +40 -0
  38. package/components/Radio/Radio.astro +70 -0
  39. package/components/Radio/RadioInput.astro +24 -0
  40. package/components/Range/Range.astro +136 -0
  41. package/components/Select/Select.astro +106 -0
  42. package/components/Switch/Switch.astro +101 -0
  43. package/components/Switch/SwitchInput.astro +25 -0
  44. package/components/Table/Body.astro +13 -0
  45. package/components/Table/Cell.astro +13 -0
  46. package/components/Table/Column.astro +15 -0
  47. package/components/Table/ColumnGroup.astro +13 -0
  48. package/components/Table/Head.astro +13 -0
  49. package/components/Table/HeaderCell.astro +13 -0
  50. package/components/Table/Row.astro +13 -0
  51. package/components/Table/Table.astro +15 -0
  52. package/components/Table/index.ts +20 -0
  53. package/components/Tabs/Tabs.astro +28 -0
  54. package/components/Tabs/TabsItem.astro +47 -0
  55. package/components/Tabs/TabsPanel.astro +21 -0
  56. package/components/Tabs/TabsTab.astro +19 -0
  57. package/components/Tabs/index.ts +14 -0
  58. package/components/TextField/TextField.astro +128 -0
  59. package/components/Textarea/Textarea.astro +106 -0
  60. package/components/Toast/Toast.astro +42 -0
  61. package/components/ToggleButton/ToggleButton.astro +53 -0
  62. package/components/ToggleGroup/ToggleGroup.astro +49 -0
  63. package/components/Tooltip/Tooltip.astro +30 -0
  64. package/{src/core → core}/normalize.css +194 -196
  65. package/core/palette.css +59 -0
  66. package/{src/core → core}/utils.css +71 -60
  67. package/css/components/accordion.css +174 -0
  68. package/css/components/anchor.css +27 -0
  69. package/{src/themes/theme-two → css}/components/avatar.css +65 -68
  70. package/css/components/badge.css +107 -0
  71. package/css/components/button-group.css +179 -0
  72. package/css/components/button.css +215 -0
  73. package/css/components/callout.css +109 -0
  74. package/css/components/card.css +117 -0
  75. package/css/components/checkbox.css +205 -0
  76. package/{src/themes/theme-one → css}/components/chip.css +87 -135
  77. package/{src/themes/theme-two/components/definition-list.css → css/components/description-list.css} +77 -68
  78. package/{src/themes/theme-two → css}/components/dialog.css +68 -59
  79. package/css/components/divider.css +20 -0
  80. package/css/components/drawer.css +171 -0
  81. package/css/components/form.css +146 -0
  82. package/css/components/icon-button.css +139 -0
  83. package/{src/themes/theme-two → css}/components/link.css +21 -21
  84. package/{src/themes/theme-two → css}/components/list.css +345 -318
  85. package/{src/themes/theme-one → css}/components/progress.css +97 -83
  86. package/css/components/radio.css +172 -0
  87. package/css/components/range.css +337 -0
  88. package/{src/themes/theme-two → css}/components/select.css +169 -162
  89. package/{src/themes/theme-two → css}/components/spinner.css +37 -38
  90. package/{src/themes/theme-two → css}/components/switch.css +268 -225
  91. package/css/components/table.css +179 -0
  92. package/css/components/tabs.css +77 -0
  93. package/css/components/text-field.css +450 -0
  94. package/css/components/text-input.css +53 -0
  95. package/{src/themes/theme-two → css}/components/textarea.css +24 -25
  96. package/css/components/toast.css +161 -0
  97. package/css/components/toggle-button.css +87 -0
  98. package/css/components/toggle-group.css +56 -0
  99. package/css/components/tooltip.css +67 -0
  100. package/css/components/typography.css +585 -0
  101. package/{src/themes/theme-two → css}/components.css +41 -37
  102. package/{src/themes/theme-two → css}/imports.css +16 -16
  103. package/css/js/checkbox.js +21 -0
  104. package/css/js/toast.js +94 -0
  105. package/css/theme.css +132 -0
  106. package/dist/op.css +1001 -32
  107. package/dist/op.css.map +1 -0
  108. package/dist/opui.components.css +5135 -0
  109. package/dist/opui.components.css.map +1 -0
  110. package/dist/opui.css +6604 -0
  111. package/dist/opui.css.map +1 -0
  112. package/env.d.ts +14 -0
  113. package/open-props.css +9 -0
  114. package/package.json +64 -56
  115. package/dist/theme-one/components.css +0 -3869
  116. package/dist/theme-one/theme-one.css +0 -4424
  117. package/dist/theme-two/components.css +0 -3591
  118. package/dist/theme-two/theme-two.css +0 -4141
  119. package/src/open-props.css +0 -10
  120. package/src/themes/theme-one/components/accordion.css +0 -172
  121. package/src/themes/theme-one/components/alert.css +0 -85
  122. package/src/themes/theme-one/components/avatar.css +0 -68
  123. package/src/themes/theme-one/components/badge.css +0 -101
  124. package/src/themes/theme-one/components/button-group.css +0 -69
  125. package/src/themes/theme-one/components/button.css +0 -281
  126. package/src/themes/theme-one/components/card.css +0 -82
  127. package/src/themes/theme-one/components/checkbox-radio.css +0 -123
  128. package/src/themes/theme-one/components/definition-list.css +0 -68
  129. package/src/themes/theme-one/components/dialog.css +0 -59
  130. package/src/themes/theme-one/components/divider.css +0 -7
  131. package/src/themes/theme-one/components/field-group.css +0 -83
  132. package/src/themes/theme-one/components/field.css +0 -494
  133. package/src/themes/theme-one/components/icon-button.css +0 -40
  134. package/src/themes/theme-one/components/link.css +0 -21
  135. package/src/themes/theme-one/components/list.css +0 -318
  136. package/src/themes/theme-one/components/range.css +0 -121
  137. package/src/themes/theme-one/components/rich-text.css +0 -210
  138. package/src/themes/theme-one/components/select.css +0 -163
  139. package/src/themes/theme-one/components/snackbar.css +0 -148
  140. package/src/themes/theme-one/components/spinner.css +0 -38
  141. package/src/themes/theme-one/components/switch.css +0 -225
  142. package/src/themes/theme-one/components/tab-buttons.css +0 -120
  143. package/src/themes/theme-one/components/table.css +0 -92
  144. package/src/themes/theme-one/components/text-field.css +0 -57
  145. package/src/themes/theme-one/components/textarea.css +0 -25
  146. package/src/themes/theme-one/components/toggle-button-group.css +0 -135
  147. package/src/themes/theme-one/components/tooltip.css +0 -94
  148. package/src/themes/theme-one/components/typography.css +0 -209
  149. package/src/themes/theme-one/components.css +0 -37
  150. package/src/themes/theme-one/imports.css +0 -16
  151. package/src/themes/theme-one/theme.css +0 -163
  152. package/src/themes/theme-two/components/accordion.css +0 -172
  153. package/src/themes/theme-two/components/alert.css +0 -85
  154. package/src/themes/theme-two/components/badge.css +0 -101
  155. package/src/themes/theme-two/components/button-group.css +0 -50
  156. package/src/themes/theme-two/components/button.css +0 -229
  157. package/src/themes/theme-two/components/card.css +0 -82
  158. package/src/themes/theme-two/components/checkbox-radio.css +0 -123
  159. package/src/themes/theme-two/components/chip.css +0 -135
  160. package/src/themes/theme-two/components/divider.css +0 -7
  161. package/src/themes/theme-two/components/field-group.css +0 -83
  162. package/src/themes/theme-two/components/field.css +0 -281
  163. package/src/themes/theme-two/components/icon-button.css +0 -40
  164. package/src/themes/theme-two/components/progress.css +0 -83
  165. package/src/themes/theme-two/components/range.css +0 -121
  166. package/src/themes/theme-two/components/rich-text.css +0 -210
  167. package/src/themes/theme-two/components/snackbar.css +0 -148
  168. package/src/themes/theme-two/components/tab-buttons.css +0 -120
  169. package/src/themes/theme-two/components/table.css +0 -99
  170. package/src/themes/theme-two/components/text-field.css +0 -57
  171. package/src/themes/theme-two/components/toggle-button-group.css +0 -135
  172. package/src/themes/theme-two/components/tooltip.css +0 -94
  173. package/src/themes/theme-two/components/typography.css +0 -209
  174. package/src/themes/theme-two/theme.css +0 -158
@@ -1,318 +0,0 @@
1
- @layer components.extended {
2
- /*
3
- Lists meant to be used stand-alone or as part of Select elements
4
-
5
- Intended use-case:
6
- - ul.list > li
7
- - .select > .list > option
8
- */
9
- :where(.list) {
10
- --_bg-color: light-dark(var(--gray-1), var(--gray-15));
11
- --_bg-color-hover: light-dark(var(--gray-2), var(--gray-14));
12
-
13
- background-color: var(--_bg-color);
14
- list-style: none;
15
- padding: var(--size-2) 0;
16
-
17
- @media (pointer: coarse) {
18
- &,
19
- * {
20
- user-select: none;
21
- }
22
- }
23
-
24
- /* Borders on all list items */
25
- &.bordered {
26
- :where(li + li, option + option) {
27
- margin-block-start: var(--size-3);
28
- &::before {
29
- block-size: 1px;
30
- border-block-start: 1px solid var(--border-color);
31
- content: "";
32
- display: block;
33
- inline-size: 100%;
34
- inset: calc(-1 * var(--size-2)) 0 auto 0;
35
- position: absolute;
36
- visibility: visible; /* override select > option:before style */
37
- }
38
- }
39
- }
40
-
41
- /* Dense - less gaps and spacing */
42
- &.dense {
43
- :where(li, option) {
44
- gap: var(--size-2);
45
- min-block-size: var(--size-7);
46
- padding: var(--size-1) var(--size-2);
47
-
48
- &.border-top {
49
- margin-block-start: var(--size-2);
50
- &::before {
51
- inset: calc(-1 * var(--size-1)) 0 auto 0;
52
- }
53
- }
54
-
55
- /* Clickable list item */
56
- &:has(> a, > button, > label) {
57
- min-block-size: auto;
58
- padding: 0;
59
- }
60
-
61
- & > :where(a, button, label) {
62
- gap: var(--size-2);
63
- min-block-size: var(--size-7);
64
- padding: var(--size-1) var(--size-2);
65
- }
66
-
67
- /* Checkbox / Radio */
68
- & > label {
69
- .end {
70
- padding-inline-end: 0.125rem;
71
- }
72
- }
73
-
74
- /* Leading and trailing content */
75
- .start,
76
- .end {
77
- .avatar {
78
- max-inline-size: var(--size-6);
79
- }
80
-
81
- .icon-button,
82
- svg {
83
- max-inline-size: var(--size-4);
84
- }
85
-
86
- .checkbox,
87
- .radio {
88
- max-inline-size: var(--size-3);
89
- }
90
- }
91
- }
92
- }
93
-
94
- /* Gutterless */
95
- &.gutterless {
96
- :where(li, option) {
97
- padding-inline: 0;
98
-
99
- & > :where(a, button, label) {
100
- padding-inline: 0;
101
- }
102
- }
103
- }
104
-
105
- /* List item */
106
- :where(li, option, [role="group"] > label) {
107
- align-items: center;
108
- background: var(--_bg-color) var(--ripple, none);
109
- display: flex;
110
- font-size: var(--font-size-sm);
111
- gap: var(--size-3);
112
- isolation: isolate;
113
- min-block-size: 40px;
114
- padding: var(--size-2) var(--size-3);
115
- position: relative;
116
-
117
- &::before {
118
- display: none; /* removing checkmark from option */
119
- }
120
-
121
- * {
122
- font-size: inherit;
123
- }
124
-
125
- /* Clickable list item */
126
- &:has(> a, > button, > label) {
127
- background: transparent;
128
- display: block;
129
- min-block-size: auto;
130
- padding: 0;
131
- }
132
-
133
- /* Select option */
134
- &:where(option) {
135
- align-items: center;
136
- background-color: var(--_bg-color);
137
- color: inherit;
138
- cursor: pointer;
139
- display: flex;
140
- gap: var(--size-3);
141
- inline-size: 100%;
142
- margin: 0;
143
- min-block-size: 40px;
144
- padding: var(--size-2) var(--size-3);
145
- text-align: start;
146
- text-decoration: none;
147
- z-index: 0;
148
-
149
- &:hover {
150
- background-color: var(--_bg-color-hover);
151
- }
152
-
153
- &:checked {
154
- background-color: oklch(from var(--primary) l c h / 30%);
155
- }
156
- }
157
-
158
- & > a,
159
- & > button,
160
- & > label {
161
- align-items: center;
162
- background: var(--_bg-color) var(--ripple, none);
163
- color: inherit;
164
- cursor: pointer;
165
- display: flex;
166
- gap: var(--size-3);
167
- inline-size: 100%;
168
- margin: 0;
169
- min-block-size: 40px;
170
- outline-offset: -3px;
171
- padding: var(--size-2) var(--size-3);
172
- text-align: start;
173
- text-decoration: none;
174
- z-index: 0;
175
-
176
- /*** Ripple effect */
177
- background-position: center;
178
- transition: background var(--button-ripple-duration);
179
- &:where(:not(:active):hover) {
180
- --ripple: radial-gradient(circle, transparent 1%, var(--_bg-color) 1%)
181
- center/15000%;
182
- }
183
-
184
- &:where(:hover:active) {
185
- background-size: var(--button-ripple-size);
186
- transition: background 0s;
187
- }
188
-
189
- &:hover {
190
- background-color: var(--_bg-color-hover);
191
- }
192
-
193
- /*** Remove ripple effect when trailing button is clicked */
194
- &:has(.end:hover) {
195
- &:where(:not(:active):hover) {
196
- --ripple: none;
197
- }
198
- }
199
- }
200
-
201
- /* Checkbox / Radio / Switch */
202
- & > label {
203
- .end {
204
- padding-inline-end: var(--size-1);
205
- }
206
-
207
- &:where(.checkbox, .radio) {
208
- inline-size: 100%;
209
- }
210
-
211
- &.switch {
212
- --_dot-size: 0.75rem;
213
- --_track-height: var(--size-4);
214
- --_track-width: 2.5rem;
215
- }
216
- }
217
-
218
- /* Video */
219
- &:has(video) {
220
- padding: 0.75rem var(--size-3) 0.75rem 0;
221
- }
222
-
223
- /* Border between list items */
224
- &.border-top {
225
- margin-block-start: var(--size-3);
226
- &::before {
227
- block-size: 1px;
228
- border-block-start: 1px solid var(--border-color);
229
- content: "";
230
- display: block;
231
- inline-size: 100%;
232
- inset: calc(-1 * var(--size-2)) 0 auto 0;
233
- position: absolute;
234
- }
235
- }
236
-
237
- /* Text */
238
- .text {
239
- flex: 1;
240
- line-height: 1.6;
241
-
242
- :where(h1, h2, h3, h4, h5, h6, p, span) {
243
- color: inherit;
244
- font-weight: 400;
245
- }
246
-
247
- p + p {
248
- font-size: var(--font-size-xs);
249
- }
250
- }
251
-
252
- /* Leading content */
253
- .start {
254
- align-self: center;
255
- align-items: center;
256
- display: grid;
257
- z-index: 1;
258
-
259
- &:has(svg) {
260
- max-inline-size: var(--size-5);
261
- }
262
-
263
- svg {
264
- padding-block-start: 0.125rem;
265
- }
266
-
267
- img {
268
- aspect-ratio: 1;
269
- inline-size: 56px;
270
- object-fit: cover;
271
- }
272
-
273
- video {
274
- aspect-ratio: 16/9;
275
- block-size: 64px;
276
- object-fit: cover;
277
- }
278
- }
279
-
280
- /* Trailing content */
281
- .end {
282
- align-items: center;
283
- display: flex;
284
- font-size: var(--font-size-xs);
285
- text-align: end;
286
- z-index: 1;
287
-
288
- &:not(:has(a, button, input)) {
289
- pointer-events: none;
290
- }
291
-
292
- kbd {
293
- background-color: transparent;
294
- border: 0;
295
- color: inherit;
296
- opacity: 0.6;
297
- }
298
-
299
- svg {
300
- max-inline-size: var(--size-5);
301
- inline-size: 100%;
302
- }
303
- }
304
-
305
- /* Inset */
306
- &.inset {
307
- .text {
308
- padding-inline-start: calc(var(--size-5) + var(--size-3));
309
- }
310
-
311
- /* Safety measure so it won't look bad if there for some reason should exist a leading element inside. */
312
- .start {
313
- display: none;
314
- }
315
- }
316
- }
317
- }
318
- }
@@ -1,121 +0,0 @@
1
- @layer components.root {
2
- :where(.range > input[type="range"]) {
3
- --thumb-bg: var(--primary);
4
- --thumb-highlight-color: oklch(from var(--primary) 70% 100% h / 20%);
5
- --thumb-highlight-size: 0px;
6
- --thumb-offset: -1ex;
7
- --thumb-size: 3ex;
8
- --track-color: var(--field-border-color);
9
- --track-fill: 0%;
10
- --track-height: 1ex;
11
-
12
- appearance: none;
13
- background: transparent;
14
- display: block;
15
- inline-size: 100%;
16
- margin: 1ex 0 3ex;
17
- outline-offset: 1ex;
18
-
19
- @media (hover: none) {
20
- --thumb-offset: -14px;
21
- --thumb-size: 30px;
22
- }
23
-
24
- /* Track */
25
- &::-webkit-slider-runnable-track {
26
- appearance: none;
27
- background: linear-gradient(
28
- to right,
29
- transparent var(--track-fill),
30
- var(--track-color) 0%
31
- ),
32
- var(--primary);
33
- block-size: var(--track-height);
34
- border-radius: 5ex;
35
- box-shadow: var(--inner-shadow-1);
36
- }
37
-
38
- &::-moz-range-track {
39
- appearance: none;
40
- background: linear-gradient(
41
- to right,
42
- transparent var(--track-fill),
43
- var(--track-color) 0%
44
- ),
45
- var(--primary);
46
- block-size: var(--track-height);
47
- border-radius: 5ex;
48
- box-shadow: var(--inner-shadow-2);
49
- }
50
-
51
- /* Ring */
52
- &::-webkit-slider-thumb {
53
- appearance: none;
54
- background: var(--thumb-bg);
55
- block-size: var(--thumb-size);
56
- border-radius: 50%;
57
- border: 3px solid var(--surface-default);
58
- box-shadow: 0 0 0 var(--thumb-highlight-size) var(--thumb-highlight-color);
59
- cursor: ew-resize;
60
- inline-size: var(--thumb-size);
61
- margin-block-start: var(--thumb-offset);
62
-
63
- @media (prefers-reduced-motion: no-preference) {
64
- transition: box-shadow 0.1s ease;
65
- }
66
-
67
- .fieldset-item:focus-within & {
68
- border-color: var(--gray-14);
69
- }
70
- }
71
-
72
- &::-moz-range-thumb {
73
- appearance: none;
74
- background: var(--thumb-bg);
75
- block-size: var(--thumb-size);
76
- border-radius: 50%;
77
- border: 3px solid var(--primary);
78
- box-shadow: 0 0 0 var(--thumb-highlight-size) var(--thumb-highlight-color);
79
- cursor: ew-resize;
80
- inline-size: var(--thumb-size);
81
- margin-block-start: var(--thumb-offset);
82
-
83
- @media (prefers-reduced-motion: no-preference) {
84
- transition: box-shadow 0.1s ease;
85
- }
86
-
87
- .fieldset-item:focus-within & {
88
- border-color: var(--gray-14);
89
- }
90
- }
91
-
92
- /* Element state */
93
- &:not([disabled]) {
94
- &:hover {
95
- --thumb-highlight-size: var(--size-1);
96
- }
97
-
98
- &:active {
99
- --thumb-highlight-size: var(--size-2);
100
- --track-color: light-dark(
101
- oklch(from var(--field-border-color) calc(l * 0.9) c h),
102
- oklch(from var(--field-border-color) calc(l * 1.1) c h)
103
- );
104
- }
105
- }
106
-
107
- &[disabled] {
108
- --thumb-bg: oklch(from var(--text-color-1) l c h / 50%);
109
- --track-color: var(--field-border-color);
110
-
111
- cursor: not-allowed;
112
-
113
- &::-webkit-slider-thumb {
114
- cursor: not-allowed;
115
- }
116
- &::-moz-range-thumb {
117
- cursor: not-allowed;
118
- }
119
- }
120
- }
121
- }
@@ -1,210 +0,0 @@
1
- @layer components.extended {
2
- @scope (.rich-text) to (.not-rich-text) {
3
- a {
4
- color: var(--primary);
5
- cursor: pointer;
6
- font-size: inherit;
7
- font-weight: 700;
8
- line-height: inherit;
9
- text-decoration: underline;
10
- text-decoration-color: var(--primary);
11
- text-underline-offset: 2px;
12
-
13
- &[href] {
14
- &:hover,
15
- &:focus-visible {
16
- color: var(--primary-light);
17
- }
18
- }
19
- }
20
-
21
- /* Blockquote */
22
- blockquote {
23
- font-size: inherit;
24
- line-height: inherit;
25
- :first-child {
26
- margin-block-start: 0;
27
- }
28
-
29
- :last-child {
30
- margin-block-end: 0;
31
- }
32
- }
33
-
34
- /* Text */
35
- p {
36
- font-size: inherit;
37
- line-height: inherit;
38
- margin-block: 1.25em;
39
- }
40
-
41
- :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
42
- color: var(--text-color-1);
43
-
44
- & + *:not(&) {
45
- margin-block-start: 0;
46
- }
47
- }
48
-
49
- h1,
50
- .h1 {
51
- font-size: var(--font-size-h1, var(--font-size-7));
52
- letter-spacing: -0.02em;
53
- line-height: 1.1111111;
54
- margin-block: 0 0.8888889em;
55
- }
56
-
57
- h2,
58
- .h2 {
59
- font-size: var(--font-size-h2, var(--font-size-5, 2rem));
60
- letter-spacing: -0.02em;
61
- line-height: 1.3333333;
62
- margin-block: 2em 1em;
63
- }
64
-
65
- h3,
66
- .h3 {
67
- font-size: var(--font-size-h3, var(--font-size-4, 1.5rem));
68
- letter-spacing: -0.01em;
69
- line-height: 1.6;
70
- margin-block: 1.6em 0.6em;
71
- }
72
-
73
- h4,
74
- .h4 {
75
- font-size: var(--font-size-h4, var(--font-size-3, 1.25rem));
76
- letter-spacing: -0.01em;
77
- line-height: 1.5;
78
- margin-block: 1.5em 0.5em;
79
- }
80
-
81
- h5,
82
- .h5 {
83
- font-size: var(--font-size-h5, var(--font-size-2, 1.1rem));
84
- line-height: 1;
85
- margin-block: 0 var(--size-1);
86
- }
87
-
88
- h6,
89
- .h6 {
90
- font-size: var(--font-size-h6, var(--font-size-1, 1rem));
91
- line-height: 1;
92
- margin-block: 0 var(--size-1);
93
- }
94
-
95
- /** Overline */
96
- :where(.overline, hgroup > :where(p, .p):first-of-type:first-child) {
97
- color: light-dark(
98
- oklch(from var(--text-color-2) calc(l * 1.25) c h),
99
- oklch(from var(--text-color-2) calc(l * 0.75) c h)
100
- );
101
- font-size: var(--font-size-xs);
102
- font-weight: 500;
103
- letter-spacing: 0.06em;
104
- line-height: 2.5;
105
- text-transform: uppercase;
106
- }
107
-
108
- hgroup {
109
- & > p {
110
- margin: 0;
111
- }
112
-
113
- & > :where(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
114
- margin-block-end: 0.4em;
115
- }
116
-
117
- & + * {
118
- margin-block-start: 3em;
119
- }
120
-
121
- /* The second p element */
122
- & > :where(p, .p):last-of-type:last-child:not(:first-child) {
123
- color: oklch(from currentColor l c h / 75%);
124
- font-size: var(--font-size-lg);
125
- line-height: 1.6;
126
- }
127
- }
128
-
129
- /* Lists */
130
- ul:not([class]) {
131
- list-style-type: disc;
132
- }
133
-
134
- ol:not([class]) {
135
- list-style-type: decimal;
136
- }
137
-
138
- :where(ul, ol):not([class]) {
139
- display: grid;
140
- font-size: inherit;
141
- gap: 0.5em;
142
- line-height: inherit;
143
- margin-block-start: 1.25em;
144
- margin-block-end: 1.25em;
145
- padding-inline-start: 1.625em;
146
-
147
- li {
148
- padding-inline-start: 0.375em;
149
- }
150
- }
151
-
152
- /* Nested lists */
153
- :where(ul ul),
154
- :where(ul ol),
155
- :where(ol ul),
156
- :where(ol ol) {
157
- margin-block-start: 0.75em;
158
- margin-block-end: 0.75em;
159
- }
160
-
161
- /* Description lists */
162
- :where(dl) {
163
- font-size: inherit;
164
- line-height: inherit;
165
- margin-block-start: 1.25em;
166
- margin-block-end: 1.25em;
167
-
168
- dt {
169
- margin-block-start: 1.25em;
170
- }
171
-
172
- dd {
173
- margin-block-start: 0.5em;
174
- padding-inline-start: 1.625em;
175
- }
176
- }
177
-
178
- /* Figures */
179
- figure {
180
- margin-block: 2em;
181
-
182
- & > * {
183
- margin-block: 0;
184
- }
185
-
186
- & figcaption {
187
- font-size: 0.875em;
188
- line-height: 1.4285714;
189
- margin-block-start: 0.8571429em;
190
- }
191
- }
192
-
193
- /* Remove top margin from first child */
194
- & > :first-child {
195
- margin-block-start: 0;
196
- }
197
-
198
- /* Remove bottom margin from last child */
199
- & > :last-child {
200
- margin-block-end: 0;
201
- }
202
-
203
- /* Horizontal rules */
204
- hr {
205
- & + * {
206
- margin-block-start: 0;
207
- }
208
- }
209
- }
210
- }