opui-css 2.2.3 → 2.3.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 (79) hide show
  1. package/README.md +23 -7
  2. package/dist/{op+ui.css → theme-one+op.css} +290 -143
  3. package/dist/{ui.css → theme-one.css} +168 -12
  4. package/dist/theme-two+op.css +4021 -0
  5. package/dist/theme-two.css +3975 -0
  6. package/package.json +6 -5
  7. package/src/themes/theme-one/components/table.css +100 -0
  8. package/src/{components → themes/theme-one/components}/toggle-button-group.css +1 -5
  9. package/src/themes/theme-one/components.css +37 -0
  10. package/src/{theme.css → themes/theme-one/setup.css} +1 -1
  11. package/src/themes/theme-one/theme+op.css +5 -0
  12. package/src/themes/theme-one/theme.css +13 -0
  13. package/src/themes/theme-two/components/accordion.css +172 -0
  14. package/src/themes/theme-two/components/alert.css +85 -0
  15. package/src/themes/theme-two/components/avatar.css +68 -0
  16. package/src/themes/theme-two/components/badge.css +101 -0
  17. package/src/themes/theme-two/components/button-group.css +50 -0
  18. package/src/themes/theme-two/components/button.css +217 -0
  19. package/src/themes/theme-two/components/card.css +82 -0
  20. package/src/themes/theme-two/components/checkbox-radio.css +123 -0
  21. package/src/themes/theme-two/components/chip.css +135 -0
  22. package/src/themes/theme-two/components/definition-list.css +65 -0
  23. package/src/themes/theme-two/components/dialog.css +59 -0
  24. package/src/themes/theme-two/components/divider.css +7 -0
  25. package/src/themes/theme-two/components/field-group.css +83 -0
  26. package/src/themes/theme-two/components/field.css +281 -0
  27. package/src/themes/theme-two/components/icon-button.css +40 -0
  28. package/src/themes/theme-two/components/link.css +21 -0
  29. package/src/themes/theme-two/components/list.css +317 -0
  30. package/src/themes/theme-two/components/progress.css +83 -0
  31. package/src/themes/theme-two/components/range.css +121 -0
  32. package/src/themes/theme-two/components/rich-text.css +210 -0
  33. package/src/themes/theme-two/components/select.css +162 -0
  34. package/src/themes/theme-two/components/snackbar.css +148 -0
  35. package/src/themes/theme-two/components/spinner.css +38 -0
  36. package/src/themes/theme-two/components/switch.css +189 -0
  37. package/src/themes/theme-two/components/tab-buttons.css +120 -0
  38. package/src/themes/theme-two/components/text-field.css +57 -0
  39. package/src/themes/theme-two/components/textarea.css +25 -0
  40. package/src/themes/theme-two/components/toggle-button-group.css +135 -0
  41. package/src/themes/theme-two/components/tooltip.css +94 -0
  42. package/src/themes/theme-two/components/typography.css +209 -0
  43. package/src/themes/theme-two/components.css +37 -0
  44. package/src/themes/theme-two/setup.css +158 -0
  45. package/src/themes/theme-two/theme+op.css +5 -0
  46. package/src/themes/theme-two/theme.css +13 -0
  47. package/src/core/components.css +0 -37
  48. package/src/main.css +0 -13
  49. package/src/opui.css +0 -10
  50. /package/src/{components → themes/theme-one/components}/accordion.css +0 -0
  51. /package/src/{components → themes/theme-one/components}/alert.css +0 -0
  52. /package/src/{components → themes/theme-one/components}/avatar.css +0 -0
  53. /package/src/{components → themes/theme-one/components}/badge.css +0 -0
  54. /package/src/{components → themes/theme-one/components}/button-group.css +0 -0
  55. /package/src/{components → themes/theme-one/components}/button.css +0 -0
  56. /package/src/{components → themes/theme-one/components}/card.css +0 -0
  57. /package/src/{components → themes/theme-one/components}/checkbox-radio.css +0 -0
  58. /package/src/{components → themes/theme-one/components}/chip.css +0 -0
  59. /package/src/{components → themes/theme-one/components}/definition-list.css +0 -0
  60. /package/src/{components → themes/theme-one/components}/dialog.css +0 -0
  61. /package/src/{components → themes/theme-one/components}/divider.css +0 -0
  62. /package/src/{components → themes/theme-one/components}/field-group.css +0 -0
  63. /package/src/{components → themes/theme-one/components}/field.css +0 -0
  64. /package/src/{components → themes/theme-one/components}/icon-button.css +0 -0
  65. /package/src/{components → themes/theme-one/components}/link.css +0 -0
  66. /package/src/{components → themes/theme-one/components}/list.css +0 -0
  67. /package/src/{components → themes/theme-one/components}/progress.css +0 -0
  68. /package/src/{components → themes/theme-one/components}/range.css +0 -0
  69. /package/src/{components → themes/theme-one/components}/rich-text.css +0 -0
  70. /package/src/{components → themes/theme-one/components}/select.css +0 -0
  71. /package/src/{components → themes/theme-one/components}/snackbar.css +0 -0
  72. /package/src/{components → themes/theme-one/components}/spinner.css +0 -0
  73. /package/src/{components → themes/theme-one/components}/switch.css +0 -0
  74. /package/src/{components → themes/theme-one/components}/tab-buttons.css +0 -0
  75. /package/src/{components → themes/theme-one/components}/text-field.css +0 -0
  76. /package/src/{components → themes/theme-one/components}/textarea.css +0 -0
  77. /package/src/{components → themes/theme-one/components}/tooltip.css +0 -0
  78. /package/src/{components → themes/theme-one/components}/typography.css +0 -0
  79. /package/src/{components → themes/theme-two/components}/table.css +0 -0
@@ -0,0 +1,317 @@
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
+
12
+ background-color: var(--_bg-color);
13
+ list-style: none;
14
+ padding: var(--size-2) 0;
15
+
16
+ @media (pointer: coarse) {
17
+ &,
18
+ * {
19
+ user-select: none;
20
+ }
21
+ }
22
+
23
+ /* Borders on all list items */
24
+ &.bordered {
25
+ :where(li + li, option + option) {
26
+ margin-block-start: var(--size-3);
27
+ &::before {
28
+ block-size: 1px;
29
+ border-block-start: 1px solid var(--border-color);
30
+ content: "";
31
+ display: block;
32
+ inline-size: 100%;
33
+ inset: calc(-1 * var(--size-2)) 0 auto 0;
34
+ position: absolute;
35
+ visibility: visible; /* override select > option:before style */
36
+ }
37
+ }
38
+ }
39
+
40
+ /* Dense - less gaps and spacing */
41
+ &.dense {
42
+ :where(li, option) {
43
+ gap: var(--size-2);
44
+ min-block-size: var(--size-7);
45
+ padding: var(--size-1) var(--size-2);
46
+
47
+ &.border-top {
48
+ margin-block-start: var(--size-2);
49
+ &::before {
50
+ inset: calc(-1 * var(--size-1)) 0 auto 0;
51
+ }
52
+ }
53
+
54
+ /* Clickable list item */
55
+ &:has(> a, > button, > label) {
56
+ min-block-size: auto;
57
+ padding: 0;
58
+ }
59
+
60
+ & > :where(a, button, label) {
61
+ gap: var(--size-2);
62
+ min-block-size: var(--size-7);
63
+ padding: var(--size-1) var(--size-2);
64
+ }
65
+
66
+ /* Checkbox / Radio */
67
+ & > label {
68
+ .end {
69
+ padding-inline-end: 0.125rem;
70
+ }
71
+ }
72
+
73
+ /* Leading and trailing content */
74
+ .start,
75
+ .end {
76
+ .avatar {
77
+ max-inline-size: var(--size-6);
78
+ }
79
+
80
+ .icon-button,
81
+ svg {
82
+ max-inline-size: var(--size-4);
83
+ }
84
+
85
+ .checkbox,
86
+ .radio {
87
+ max-inline-size: var(--size-3);
88
+ }
89
+ }
90
+ }
91
+ }
92
+
93
+ /* Gutterless */
94
+ &.gutterless {
95
+ :where(li, option) {
96
+ padding-inline: 0;
97
+
98
+ & > :where(a, button, label) {
99
+ padding-inline: 0;
100
+ }
101
+ }
102
+ }
103
+
104
+ /* List item */
105
+ :where(li, option, [role="group"] > label) {
106
+ align-items: center;
107
+ background: var(--_bg-color) var(--ripple, none);
108
+ display: flex;
109
+ font-size: var(--font-size-sm);
110
+ gap: var(--size-3);
111
+ isolation: isolate;
112
+ min-block-size: 40px;
113
+ padding: var(--size-2) var(--size-3);
114
+ position: relative;
115
+
116
+ &::before {
117
+ display: none; /* removing checkmark from option */
118
+ }
119
+
120
+ * {
121
+ font-size: inherit;
122
+ }
123
+
124
+ /* Clickable list item */
125
+ &:has(> a, > button, > label) {
126
+ background: transparent;
127
+ display: block;
128
+ min-block-size: auto;
129
+ padding: 0;
130
+ }
131
+
132
+ /* Select option */
133
+ &:where(option) {
134
+ align-items: center;
135
+ background-color: var(--_bg-color);
136
+ color: inherit;
137
+ cursor: pointer;
138
+ display: flex;
139
+ gap: var(--size-3);
140
+ inline-size: 100%;
141
+ margin: 0;
142
+ min-block-size: 40px;
143
+ padding: var(--size-2) var(--size-3);
144
+ text-align: start;
145
+ text-decoration: none;
146
+ z-index: 0;
147
+
148
+ &:hover {
149
+ background-color: light-dark(var(--gray-2), var(--gray-14));
150
+ }
151
+
152
+ &:checked {
153
+ background-color: oklch(from var(--primary) l c h / 30%);
154
+ }
155
+ }
156
+
157
+ & > a,
158
+ & > button,
159
+ & > label {
160
+ align-items: center;
161
+ background: var(--_bg-color) var(--ripple, none);
162
+ color: inherit;
163
+ cursor: pointer;
164
+ display: flex;
165
+ gap: var(--size-3);
166
+ inline-size: 100%;
167
+ margin: 0;
168
+ min-block-size: 40px;
169
+ outline-offset: -3px;
170
+ padding: var(--size-2) var(--size-3);
171
+ text-align: start;
172
+ text-decoration: none;
173
+ z-index: 0;
174
+
175
+ /*** Ripple effect */
176
+ background-position: center;
177
+ transition: background var(--button-ripple-duration);
178
+ &:where(:not(:active):hover) {
179
+ --ripple: radial-gradient(circle, transparent 1%, var(--_bg-color) 1%)
180
+ center/15000%;
181
+ }
182
+
183
+ &:where(:hover:active) {
184
+ background-size: var(--button-ripple-size);
185
+ transition: background 0s;
186
+ }
187
+
188
+ &:hover {
189
+ background-color: light-dark(var(--gray-2), var(--gray-14));
190
+ }
191
+
192
+ /*** Remove ripple effect when trailing button is clicked */
193
+ &:has(.end:hover) {
194
+ &:where(:not(:active):hover) {
195
+ --ripple: none;
196
+ }
197
+ }
198
+ }
199
+
200
+ /* Checkbox / Radio / Switch */
201
+ & > label {
202
+ .end {
203
+ padding-inline-end: var(--size-1);
204
+ }
205
+
206
+ &:where(.checkbox, .radio) {
207
+ inline-size: 100%;
208
+ }
209
+
210
+ &.switch {
211
+ --_dot-size: 0.75rem;
212
+ --_track-height: var(--size-4);
213
+ --_track-width: 2.5rem;
214
+ }
215
+ }
216
+
217
+ /* Video */
218
+ &:has(video) {
219
+ padding: 0.75rem var(--size-3) 0.75rem 0;
220
+ }
221
+
222
+ /* Border between list items */
223
+ &.border-top {
224
+ margin-block-start: var(--size-3);
225
+ &::before {
226
+ block-size: 1px;
227
+ border-block-start: 1px solid var(--border-color);
228
+ content: "";
229
+ display: block;
230
+ inline-size: 100%;
231
+ inset: calc(-1 * var(--size-2)) 0 auto 0;
232
+ position: absolute;
233
+ }
234
+ }
235
+
236
+ /* Text */
237
+ .text {
238
+ flex: 1;
239
+ line-height: 1.6;
240
+
241
+ :where(h1, h2, h3, h4, h5, h6, p, span) {
242
+ color: inherit;
243
+ font-weight: 400;
244
+ }
245
+
246
+ p + p {
247
+ font-size: var(--font-size-xs);
248
+ }
249
+ }
250
+
251
+ /* Leading content */
252
+ .start {
253
+ align-self: center;
254
+ align-items: center;
255
+ display: grid;
256
+ z-index: 1;
257
+
258
+ &:has(svg) {
259
+ max-inline-size: var(--size-5);
260
+ }
261
+
262
+ svg {
263
+ padding-block-start: 0.125rem;
264
+ }
265
+
266
+ img {
267
+ aspect-ratio: 1;
268
+ inline-size: 56px;
269
+ object-fit: cover;
270
+ }
271
+
272
+ video {
273
+ aspect-ratio: 16/9;
274
+ block-size: 64px;
275
+ object-fit: cover;
276
+ }
277
+ }
278
+
279
+ /* Trailing content */
280
+ .end {
281
+ align-items: center;
282
+ display: flex;
283
+ font-size: var(--font-size-xs);
284
+ text-align: end;
285
+ z-index: 1;
286
+
287
+ &:not(:has(a, button, input)) {
288
+ pointer-events: none;
289
+ }
290
+
291
+ kbd {
292
+ background-color: transparent;
293
+ border: 0;
294
+ color: inherit;
295
+ opacity: 0.6;
296
+ }
297
+
298
+ svg {
299
+ max-inline-size: var(--size-5);
300
+ inline-size: 100%;
301
+ }
302
+ }
303
+
304
+ /* Inset */
305
+ &.inset {
306
+ .text {
307
+ padding-inline-start: calc(var(--size-5) + var(--size-3));
308
+ }
309
+
310
+ /* Safety measure so it won't look bad if there for some reason should exist a leading element inside. */
311
+ .start {
312
+ display: none;
313
+ }
314
+ }
315
+ }
316
+ }
317
+ }
@@ -0,0 +1,83 @@
1
+ @layer components.root {
2
+ :where(progress) {
3
+ --_accent-color: var(--primary);
4
+ --_bg-color: var(--surface-tonal);
5
+
6
+ appearance: none;
7
+ background-color: var(--_bg-color);
8
+ border-radius: var(--border-radius, 0.25rem);
9
+ border: 0;
10
+ display: inline-block;
11
+ block-size: var(--size-1);
12
+ overflow: hidden;
13
+ position: relative;
14
+ vertical-align: baseline;
15
+ inline-size: 100%;
16
+
17
+ &::-webkit-progress-bar {
18
+ border-radius: var(--border-radius, 0.25rem);
19
+ background: none;
20
+ }
21
+
22
+ &[value]::-webkit-progress-value {
23
+ background-color: var(--_accent-color);
24
+
25
+ @media (prefers-reduced-motion: no-preference) {
26
+ transition: inline-size 0.2s
27
+ var(--ease-out-4, cubic-bezier(0, 0, 0.1, 1));
28
+ }
29
+ }
30
+
31
+ &::-moz-progress-bar {
32
+ background-color: var(--_accent-color);
33
+ }
34
+ }
35
+
36
+ @media (prefers-reduced-motion: no-preference) {
37
+ progress:indeterminate {
38
+ background-color: var(--_bg-color);
39
+
40
+ &::after {
41
+ animation: indeterminate 2s linear infinite;
42
+ background-color: var(--_accent-color);
43
+ content: "";
44
+ inset: 0 auto 0 0;
45
+ position: absolute;
46
+ will-change: inset-inline-start, inset-inline-end;
47
+ }
48
+
49
+ &[value]::-webkit-progress-value {
50
+ background-color: transparent;
51
+ }
52
+
53
+ &::-moz-progress-bar {
54
+ background-color: transparent;
55
+ }
56
+ }
57
+
58
+ [dir="rtl"] {
59
+ :where(progress):indeterminate {
60
+ animation-direction: reverse;
61
+
62
+ &::after {
63
+ animation-direction: reverse;
64
+ }
65
+ }
66
+ }
67
+ }
68
+
69
+ @keyframes indeterminate {
70
+ 0% {
71
+ left: -200%;
72
+ right: 100%;
73
+ }
74
+ 60% {
75
+ left: 107%;
76
+ right: -8%;
77
+ }
78
+ 100% {
79
+ left: 107%;
80
+ right: -8%;
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,121 @@
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
+ }
@@ -0,0 +1,210 @@
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
+ }