opui-css 1.2.7 → 2.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.
- package/LICENSE +21 -21
- package/README.md +32 -25
- package/dist/op+ui.css +4195 -4195
- package/dist/ui.css +4197 -4197
- package/package.json +1 -1
- package/src/components/accordion.css +172 -172
- package/src/components/alert.css +85 -85
- package/src/components/avatar.css +68 -68
- package/src/components/badge.css +101 -101
- package/src/components/button-group.css +69 -69
- package/src/components/button.css +267 -267
- package/src/components/card.css +82 -82
- package/src/components/checkbox-radio.css +123 -123
- package/src/components/chip.css +135 -135
- package/src/components/definition-list.css +65 -65
- package/src/components/dialog.css +59 -59
- package/src/components/divider.css +7 -7
- package/src/components/field-group.css +83 -83
- package/src/components/field.css +494 -494
- package/src/components/icon-button.css +40 -40
- package/src/components/list.css +317 -317
- package/src/components/progress.css +83 -83
- package/src/components/range.css +121 -121
- package/src/components/rich-text.css +210 -210
- package/src/components/select.css +163 -163
- package/src/components/snackbar.css +148 -148
- package/src/components/spinner.css +38 -38
- package/src/components/switch.css +189 -189
- package/src/components/tab-buttons.css +120 -120
- package/src/components/table.css +107 -107
- package/src/components/text-field.css +57 -57
- package/src/components/textarea.css +25 -25
- package/src/components/toggle-button-group.css +139 -139
- package/src/components/tooltip.css +94 -94
- package/src/components/typography.css +209 -209
- package/src/core/normalize.css +194 -194
- package/src/core/theme.css +160 -160
- package/src/core/utils.css +60 -60
- package/src/main.css +13 -13
|
@@ -1,209 +1,209 @@
|
|
|
1
|
-
@layer components.root {
|
|
2
|
-
/* Base typography */
|
|
3
|
-
:where(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
|
|
4
|
-
color: var(--text-color-1);
|
|
5
|
-
font-weight: 700;
|
|
6
|
-
text-wrap: pretty;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:where(h1, .h1) {
|
|
10
|
-
font-size: var(--font-size-h1, var(--font-size-7));
|
|
11
|
-
letter-spacing: -0.02em;
|
|
12
|
-
line-height: 1.15;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:where(h2, .h2) {
|
|
16
|
-
font-size: var(--font-size-h2, var(--font-size-5, 2rem));
|
|
17
|
-
letter-spacing: -0.02em;
|
|
18
|
-
line-height: 1.2;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
:where(h3, .h3) {
|
|
22
|
-
font-size: var(--font-size-h3, var(--font-size-4, 1.5rem));
|
|
23
|
-
letter-spacing: -0.01em;
|
|
24
|
-
line-height: 1.167;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
:where(h4, .h4) {
|
|
28
|
-
font-size: var(--font-size-h4, var(--font-size-3, 1.25rem));
|
|
29
|
-
letter-spacing: -0.01em;
|
|
30
|
-
line-height: 1.235;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
:where(h5, .h5) {
|
|
34
|
-
font-size: var(--font-size-h5, var(--font-size-2, 1.1rem));
|
|
35
|
-
line-height: 1.334;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:where(h6, .h6) {
|
|
39
|
-
font-size: var(--font-size-h6, var(--font-size-1, 1rem));
|
|
40
|
-
line-height: 1;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
:where(hgroup) {
|
|
44
|
-
& > :where(p, .p) {
|
|
45
|
-
margin: 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
& > :where(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
|
|
49
|
-
margin-block-end: 0.4em;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* The second p element */
|
|
53
|
-
& > :where(p, .p):last-of-type:last-child:not(:first-child) {
|
|
54
|
-
color: oklch(from currentColor l c h / 75%);
|
|
55
|
-
font-size: var(--font-size-lg);
|
|
56
|
-
line-height: 1.6;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/** Overline */
|
|
61
|
-
:where(.overline, hgroup > :where(p, .p):first-of-type:first-child) {
|
|
62
|
-
color: light-dark(
|
|
63
|
-
oklch(from var(--text-color-2) calc(l * 1.25) c h),
|
|
64
|
-
oklch(from var(--text-color-2) calc(l * 0.75) c h)
|
|
65
|
-
);
|
|
66
|
-
font-size: var(--font-size-xs);
|
|
67
|
-
font-weight: 500;
|
|
68
|
-
letter-spacing: 0.06em;
|
|
69
|
-
line-height: 2.5;
|
|
70
|
-
text-transform: uppercase;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
:where(p, .p) {
|
|
74
|
-
text-wrap: pretty;
|
|
75
|
-
|
|
76
|
-
&.small {
|
|
77
|
-
font-size: var(--font-size-md);
|
|
78
|
-
}
|
|
79
|
-
&.large {
|
|
80
|
-
font-size: var(--font-size-lg);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* Inline text elements */
|
|
85
|
-
:where(ins, u, abbr, dfn) {
|
|
86
|
-
text-decoration: underline;
|
|
87
|
-
text-underline-offset: 1px;
|
|
88
|
-
|
|
89
|
-
@supports (-moz-appearance: none) {
|
|
90
|
-
text-underline-offset: 2px;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
:where(abbr, dfn) {
|
|
95
|
-
font-style: normal;
|
|
96
|
-
text-decoration: var(--color-9) underline dotted;
|
|
97
|
-
|
|
98
|
-
&[title] {
|
|
99
|
-
cursor: help;
|
|
100
|
-
text-underline-offset: 1px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
@supports (-moz-appearance: none) {
|
|
104
|
-
text-underline-offset: 2px;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
:where(sup) {
|
|
109
|
-
font-size: 0.5em;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
:where(del, ins) {
|
|
113
|
-
color: var(--color-9);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
:where(small) {
|
|
117
|
-
font-size: max(0.5em, var(--font-size-0, 0.75rem));
|
|
118
|
-
max-inline-size: var(--size-content-1);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
:where(cite) {
|
|
122
|
-
font-style: italic;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/* Blockquote */
|
|
126
|
-
:where(blockquote) {
|
|
127
|
-
border-inline-start-width: var(--border-size-3);
|
|
128
|
-
display: grid;
|
|
129
|
-
gap: var(--size-3);
|
|
130
|
-
padding-block: var(--size-3);
|
|
131
|
-
padding-inline: var(--size-4);
|
|
132
|
-
|
|
133
|
-
:first-child {
|
|
134
|
-
margin-block-start: 0;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
:last-child {
|
|
138
|
-
margin-block-end: 0;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
footer {
|
|
142
|
-
color: var(--text-color-2);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/* Code */
|
|
147
|
-
:where(pre) {
|
|
148
|
-
border-radius: 0.375rem;
|
|
149
|
-
direction: ltr;
|
|
150
|
-
font-size: 0.875rem;
|
|
151
|
-
line-height: 1.7142857;
|
|
152
|
-
margin-block: 1.7142857em;
|
|
153
|
-
max-inline-size: max-content;
|
|
154
|
-
min-inline-size: 0;
|
|
155
|
-
padding-block: 0.8571429em;
|
|
156
|
-
padding-inline: 1.1428571em;
|
|
157
|
-
white-space: pre;
|
|
158
|
-
writing-mode: lr;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
:where(code, kbd, samp, pre) {
|
|
162
|
-
font-family: var(--font-mono);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
:where(code) {
|
|
166
|
-
background-color: oklch(00 0 0 /18%);
|
|
167
|
-
border-radius: var(--border-size-3);
|
|
168
|
-
font-size: 0.9em;
|
|
169
|
-
padding: 0.2ex 0.5ex;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
:where(kbd, var) {
|
|
173
|
-
background-color: var(--text-color-2);
|
|
174
|
-
border-color: var(--text-color-2);
|
|
175
|
-
border-radius: var(--border-radius, var(--radius-2));
|
|
176
|
-
border-width: var(--border-size-1);
|
|
177
|
-
color: var(--text-color-2-contrast);
|
|
178
|
-
padding: calc(var(--size-1) / 2) var(--size-1);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
:where(:not(pre) code, kbd) {
|
|
182
|
-
word-break: break-word;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
:where(:not(pre) code) {
|
|
186
|
-
border-radius: var(--border-radius, var(--radius-2));
|
|
187
|
-
padding: var(--size-1) var(--size-2);
|
|
188
|
-
writing-mode: lr;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
:where(mark) {
|
|
192
|
-
border-radius: var(--border-radius, 0);
|
|
193
|
-
box-decoration-break: clone;
|
|
194
|
-
padding: calc(var(--size-1) / 2) var(--size-1);
|
|
195
|
-
vertical-align: baseline;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/* Misc */
|
|
199
|
-
:where(dt) {
|
|
200
|
-
font-weight: 700;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
:where(figure) {
|
|
204
|
-
& > :where(figcaption) {
|
|
205
|
-
font-size: var(--font-size-1, 1rem);
|
|
206
|
-
text-wrap: balance;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
1
|
+
@layer components.root {
|
|
2
|
+
/* Base typography */
|
|
3
|
+
:where(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
|
|
4
|
+
color: var(--text-color-1);
|
|
5
|
+
font-weight: 700;
|
|
6
|
+
text-wrap: pretty;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where(h1, .h1) {
|
|
10
|
+
font-size: var(--font-size-h1, var(--font-size-7));
|
|
11
|
+
letter-spacing: -0.02em;
|
|
12
|
+
line-height: 1.15;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where(h2, .h2) {
|
|
16
|
+
font-size: var(--font-size-h2, var(--font-size-5, 2rem));
|
|
17
|
+
letter-spacing: -0.02em;
|
|
18
|
+
line-height: 1.2;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(h3, .h3) {
|
|
22
|
+
font-size: var(--font-size-h3, var(--font-size-4, 1.5rem));
|
|
23
|
+
letter-spacing: -0.01em;
|
|
24
|
+
line-height: 1.167;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(h4, .h4) {
|
|
28
|
+
font-size: var(--font-size-h4, var(--font-size-3, 1.25rem));
|
|
29
|
+
letter-spacing: -0.01em;
|
|
30
|
+
line-height: 1.235;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(h5, .h5) {
|
|
34
|
+
font-size: var(--font-size-h5, var(--font-size-2, 1.1rem));
|
|
35
|
+
line-height: 1.334;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where(h6, .h6) {
|
|
39
|
+
font-size: var(--font-size-h6, var(--font-size-1, 1rem));
|
|
40
|
+
line-height: 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where(hgroup) {
|
|
44
|
+
& > :where(p, .p) {
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
& > :where(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
|
|
49
|
+
margin-block-end: 0.4em;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* The second p element */
|
|
53
|
+
& > :where(p, .p):last-of-type:last-child:not(:first-child) {
|
|
54
|
+
color: oklch(from currentColor l c h / 75%);
|
|
55
|
+
font-size: var(--font-size-lg);
|
|
56
|
+
line-height: 1.6;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Overline */
|
|
61
|
+
:where(.overline, hgroup > :where(p, .p):first-of-type:first-child) {
|
|
62
|
+
color: light-dark(
|
|
63
|
+
oklch(from var(--text-color-2) calc(l * 1.25) c h),
|
|
64
|
+
oklch(from var(--text-color-2) calc(l * 0.75) c h)
|
|
65
|
+
);
|
|
66
|
+
font-size: var(--font-size-xs);
|
|
67
|
+
font-weight: 500;
|
|
68
|
+
letter-spacing: 0.06em;
|
|
69
|
+
line-height: 2.5;
|
|
70
|
+
text-transform: uppercase;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:where(p, .p) {
|
|
74
|
+
text-wrap: pretty;
|
|
75
|
+
|
|
76
|
+
&.small {
|
|
77
|
+
font-size: var(--font-size-md);
|
|
78
|
+
}
|
|
79
|
+
&.large {
|
|
80
|
+
font-size: var(--font-size-lg);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Inline text elements */
|
|
85
|
+
:where(ins, u, abbr, dfn) {
|
|
86
|
+
text-decoration: underline;
|
|
87
|
+
text-underline-offset: 1px;
|
|
88
|
+
|
|
89
|
+
@supports (-moz-appearance: none) {
|
|
90
|
+
text-underline-offset: 2px;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:where(abbr, dfn) {
|
|
95
|
+
font-style: normal;
|
|
96
|
+
text-decoration: var(--color-9) underline dotted;
|
|
97
|
+
|
|
98
|
+
&[title] {
|
|
99
|
+
cursor: help;
|
|
100
|
+
text-underline-offset: 1px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@supports (-moz-appearance: none) {
|
|
104
|
+
text-underline-offset: 2px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:where(sup) {
|
|
109
|
+
font-size: 0.5em;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:where(del, ins) {
|
|
113
|
+
color: var(--color-9);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:where(small) {
|
|
117
|
+
font-size: max(0.5em, var(--font-size-0, 0.75rem));
|
|
118
|
+
max-inline-size: var(--size-content-1);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:where(cite) {
|
|
122
|
+
font-style: italic;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Blockquote */
|
|
126
|
+
:where(blockquote) {
|
|
127
|
+
border-inline-start-width: var(--border-size-3);
|
|
128
|
+
display: grid;
|
|
129
|
+
gap: var(--size-3);
|
|
130
|
+
padding-block: var(--size-3);
|
|
131
|
+
padding-inline: var(--size-4);
|
|
132
|
+
|
|
133
|
+
:first-child {
|
|
134
|
+
margin-block-start: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:last-child {
|
|
138
|
+
margin-block-end: 0;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
footer {
|
|
142
|
+
color: var(--text-color-2);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Code */
|
|
147
|
+
:where(pre) {
|
|
148
|
+
border-radius: 0.375rem;
|
|
149
|
+
direction: ltr;
|
|
150
|
+
font-size: 0.875rem;
|
|
151
|
+
line-height: 1.7142857;
|
|
152
|
+
margin-block: 1.7142857em;
|
|
153
|
+
max-inline-size: max-content;
|
|
154
|
+
min-inline-size: 0;
|
|
155
|
+
padding-block: 0.8571429em;
|
|
156
|
+
padding-inline: 1.1428571em;
|
|
157
|
+
white-space: pre;
|
|
158
|
+
writing-mode: lr;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
:where(code, kbd, samp, pre) {
|
|
162
|
+
font-family: var(--font-mono);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:where(code) {
|
|
166
|
+
background-color: oklch(00 0 0 /18%);
|
|
167
|
+
border-radius: var(--border-size-3);
|
|
168
|
+
font-size: 0.9em;
|
|
169
|
+
padding: 0.2ex 0.5ex;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:where(kbd, var) {
|
|
173
|
+
background-color: var(--text-color-2);
|
|
174
|
+
border-color: var(--text-color-2);
|
|
175
|
+
border-radius: var(--border-radius, var(--radius-2));
|
|
176
|
+
border-width: var(--border-size-1);
|
|
177
|
+
color: var(--text-color-2-contrast);
|
|
178
|
+
padding: calc(var(--size-1) / 2) var(--size-1);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:where(:not(pre) code, kbd) {
|
|
182
|
+
word-break: break-word;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
:where(:not(pre) code) {
|
|
186
|
+
border-radius: var(--border-radius, var(--radius-2));
|
|
187
|
+
padding: var(--size-1) var(--size-2);
|
|
188
|
+
writing-mode: lr;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:where(mark) {
|
|
192
|
+
border-radius: var(--border-radius, 0);
|
|
193
|
+
box-decoration-break: clone;
|
|
194
|
+
padding: calc(var(--size-1) / 2) var(--size-1);
|
|
195
|
+
vertical-align: baseline;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Misc */
|
|
199
|
+
:where(dt) {
|
|
200
|
+
font-weight: 700;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
:where(figure) {
|
|
204
|
+
& > :where(figcaption) {
|
|
205
|
+
font-size: var(--font-size-1, 1rem);
|
|
206
|
+
text-wrap: balance;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|