opui-css 1.2.4
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.
- package/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/ui.css +4417 -0
- package/package.json +33 -0
- package/src/components/accordion.css +172 -0
- package/src/components/alert.css +85 -0
- package/src/components/avatar.css +68 -0
- package/src/components/badge.css +101 -0
- package/src/components/button-group.css +69 -0
- package/src/components/button.css +272 -0
- package/src/components/card.css +82 -0
- package/src/components/checkbox-radio.css +123 -0
- package/src/components/chip.css +135 -0
- package/src/components/definition-list.css +65 -0
- package/src/components/description-list.css +0 -0
- package/src/components/dialog.css +61 -0
- package/src/components/divider.css +7 -0
- package/src/components/field-group.css +83 -0
- package/src/components/field.css +500 -0
- package/src/components/icon-button.css +40 -0
- package/src/components/link.css +21 -0
- package/src/components/list.css +317 -0
- package/src/components/progress.css +80 -0
- package/src/components/range.css +121 -0
- package/src/components/rich-text.css +210 -0
- package/src/components/select.css +166 -0
- package/src/components/snackbar.css +152 -0
- package/src/components/spinner.css +38 -0
- package/src/components/switch.css +189 -0
- package/src/components/tab-buttons.css +124 -0
- package/src/components/table.css +107 -0
- package/src/components/text-field.css +57 -0
- package/src/components/textarea.css +25 -0
- package/src/components/toggle-button-group.css +142 -0
- package/src/components/tooltip.css +94 -0
- package/src/components/typography.css +209 -0
- package/src/main.css +59 -0
- package/src/normalize.css +194 -0
- package/src/theme.css +160 -0
- package/src/utils.css +60 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
@layer components.has-deps {
|
|
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,80 @@
|
|
|
1
|
+
:where(progress) {
|
|
2
|
+
--_accent-color: var(--primary);
|
|
3
|
+
--_bg-color: var(--surface-tonal);
|
|
4
|
+
|
|
5
|
+
appearance: none;
|
|
6
|
+
background-color: var(--_bg-color);
|
|
7
|
+
border-radius: var(--border-radius, 0.25rem);
|
|
8
|
+
border: 0;
|
|
9
|
+
display: inline-block;
|
|
10
|
+
block-size: var(--size-1);
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
position: relative;
|
|
13
|
+
vertical-align: baseline;
|
|
14
|
+
inline-size: 100%;
|
|
15
|
+
|
|
16
|
+
&::-webkit-progress-bar {
|
|
17
|
+
border-radius: var(--border-radius, 0.25rem);
|
|
18
|
+
background: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&[value]::-webkit-progress-value {
|
|
22
|
+
background-color: var(--_accent-color);
|
|
23
|
+
|
|
24
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
25
|
+
transition: inline-size 0.2s var(--ease-out-4, cubic-bezier(0, 0, 0.1, 1));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&::-moz-progress-bar {
|
|
30
|
+
background-color: var(--_accent-color);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
35
|
+
progress:indeterminate {
|
|
36
|
+
background-color: var(--_bg-color);
|
|
37
|
+
|
|
38
|
+
&::after {
|
|
39
|
+
animation: indeterminate 2s linear infinite;
|
|
40
|
+
background-color: var(--_accent-color);
|
|
41
|
+
content: "";
|
|
42
|
+
inset: 0 auto 0 0;
|
|
43
|
+
position: absolute;
|
|
44
|
+
will-change: inset-inline-start, inset-inline-end;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&[value]::-webkit-progress-value {
|
|
48
|
+
background-color: transparent;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&::-moz-progress-bar {
|
|
52
|
+
background-color: transparent;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[dir="rtl"] {
|
|
57
|
+
:where(progress):indeterminate {
|
|
58
|
+
animation-direction: reverse;
|
|
59
|
+
|
|
60
|
+
&::after {
|
|
61
|
+
animation-direction: reverse;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@keyframes indeterminate {
|
|
68
|
+
0% {
|
|
69
|
+
left: -200%;
|
|
70
|
+
right: 100%;
|
|
71
|
+
}
|
|
72
|
+
60% {
|
|
73
|
+
left: 107%;
|
|
74
|
+
right: -8%;
|
|
75
|
+
}
|
|
76
|
+
100% {
|
|
77
|
+
left: 107%;
|
|
78
|
+
right: -8%;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
@layer components.base {
|
|
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.has-deps {
|
|
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
|
+
}
|