opui-css 3.3.1 → 3.3.3
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/dist/op.css +52 -52
- package/dist/theme-one/components.css +3869 -0
- package/dist/{theme-one.css → theme-one/theme-one.css} +4404 -4404
- package/dist/theme-two/components.css +3591 -0
- package/dist/{theme-two.css → theme-two/theme-two.css} +4121 -4121
- package/package.json +8 -3
- package/src/core/normalize.css +196 -196
- package/src/core/utils.css +60 -60
- package/src/open-props.css +10 -10
- package/src/themes/theme-one/components/accordion.css +172 -172
- package/src/themes/theme-one/components/alert.css +85 -85
- package/src/themes/theme-one/components/avatar.css +68 -68
- package/src/themes/theme-one/components/badge.css +101 -101
- package/src/themes/theme-one/components/button-group.css +69 -69
- package/src/themes/theme-one/components/button.css +281 -281
- package/src/themes/theme-one/components/card.css +82 -82
- package/src/themes/theme-one/components/checkbox-radio.css +123 -123
- package/src/themes/theme-one/components/chip.css +135 -135
- package/src/themes/theme-one/components/definition-list.css +68 -68
- package/src/themes/theme-one/components/dialog.css +59 -59
- package/src/themes/theme-one/components/divider.css +7 -7
- package/src/themes/theme-one/components/field-group.css +83 -83
- package/src/themes/theme-one/components/field.css +494 -494
- package/src/themes/theme-one/components/icon-button.css +40 -40
- package/src/themes/theme-one/components/link.css +21 -21
- package/src/themes/theme-one/components/list.css +318 -318
- package/src/themes/theme-one/components/progress.css +83 -83
- package/src/themes/theme-one/components/range.css +121 -121
- package/src/themes/theme-one/components/rich-text.css +210 -210
- package/src/themes/theme-one/components/select.css +163 -163
- package/src/themes/theme-one/components/snackbar.css +148 -148
- package/src/themes/theme-one/components/spinner.css +38 -38
- package/src/themes/theme-one/components/switch.css +225 -225
- package/src/themes/theme-one/components/tab-buttons.css +120 -120
- package/src/themes/theme-one/components/table.css +92 -92
- package/src/themes/theme-one/components/text-field.css +57 -57
- package/src/themes/theme-one/components/textarea.css +25 -25
- package/src/themes/theme-one/components/toggle-button-group.css +135 -135
- package/src/themes/theme-one/components/tooltip.css +94 -94
- package/src/themes/theme-one/components/typography.css +209 -209
- package/src/themes/theme-one/components.css +37 -37
- package/src/themes/theme-one/imports.css +16 -16
- package/src/themes/theme-one/theme.css +163 -163
- package/src/themes/theme-two/components/accordion.css +172 -172
- package/src/themes/theme-two/components/alert.css +85 -85
- package/src/themes/theme-two/components/avatar.css +68 -68
- package/src/themes/theme-two/components/badge.css +101 -101
- package/src/themes/theme-two/components/button-group.css +50 -50
- package/src/themes/theme-two/components/button.css +229 -229
- package/src/themes/theme-two/components/card.css +82 -82
- package/src/themes/theme-two/components/checkbox-radio.css +123 -123
- package/src/themes/theme-two/components/chip.css +135 -135
- package/src/themes/theme-two/components/definition-list.css +68 -68
- package/src/themes/theme-two/components/dialog.css +59 -59
- package/src/themes/theme-two/components/divider.css +7 -7
- package/src/themes/theme-two/components/field-group.css +83 -83
- package/src/themes/theme-two/components/field.css +281 -281
- package/src/themes/theme-two/components/icon-button.css +40 -40
- package/src/themes/theme-two/components/link.css +21 -21
- package/src/themes/theme-two/components/list.css +318 -318
- package/src/themes/theme-two/components/progress.css +83 -83
- package/src/themes/theme-two/components/range.css +121 -121
- package/src/themes/theme-two/components/rich-text.css +210 -210
- package/src/themes/theme-two/components/select.css +162 -162
- package/src/themes/theme-two/components/snackbar.css +148 -148
- package/src/themes/theme-two/components/spinner.css +38 -38
- package/src/themes/theme-two/components/switch.css +225 -225
- package/src/themes/theme-two/components/tab-buttons.css +120 -120
- package/src/themes/theme-two/components/table.css +99 -99
- package/src/themes/theme-two/components/text-field.css +57 -57
- package/src/themes/theme-two/components/textarea.css +25 -25
- package/src/themes/theme-two/components/toggle-button-group.css +135 -135
- package/src/themes/theme-two/components/tooltip.css +94 -94
- package/src/themes/theme-two/components/typography.css +209 -209
- package/src/themes/theme-two/components.css +37 -37
- package/src/themes/theme-two/imports.css +16 -16
- package/src/themes/theme-two/theme.css +158 -158
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opui-css",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -11,9 +11,14 @@
|
|
|
11
11
|
"sideEffects": [
|
|
12
12
|
"**/*.css"
|
|
13
13
|
],
|
|
14
|
-
"style": "dist/
|
|
14
|
+
"style": "dist/theme-two/theme-two.css",
|
|
15
15
|
"exports": {
|
|
16
|
-
".": "./dist/
|
|
16
|
+
".": "./dist/theme-two/theme-two.css",
|
|
17
|
+
"./open-props": "./dist/op.css",
|
|
18
|
+
"./theme-one": "./dist/theme-one/theme-one.css",
|
|
19
|
+
"./theme-one/components": "./dist/theme-one/components.css",
|
|
20
|
+
"./theme-two": "./dist/theme-two/theme-two.css",
|
|
21
|
+
"./theme-two/components": "./dist/theme-two/components.css",
|
|
17
22
|
"./dist/*": "./dist/*",
|
|
18
23
|
"./src/*": "./src/*"
|
|
19
24
|
},
|
package/src/core/normalize.css
CHANGED
|
@@ -1,196 +1,196 @@
|
|
|
1
|
-
@layer normalize {
|
|
2
|
-
*,
|
|
3
|
-
::before,
|
|
4
|
-
::after {
|
|
5
|
-
/* Set box sizing instead of inheriting */
|
|
6
|
-
/* https://www.oddbird.net/2025/09/04/box-model/ */
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
* {
|
|
11
|
-
scrollbar-width: thin;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:where(html) {
|
|
15
|
-
--_page-bg-color: var(--surface-default);
|
|
16
|
-
|
|
17
|
-
accent-color: var(--primary);
|
|
18
|
-
background-color: var(--_page-bg-color);
|
|
19
|
-
block-size: 100%;
|
|
20
|
-
caret-color: var(--primary);
|
|
21
|
-
color: var(--text-color-2);
|
|
22
|
-
font-family: var(--font-sans);
|
|
23
|
-
interpolate-size: allow-keywords;
|
|
24
|
-
line-height: var(--font-lineheight-4);
|
|
25
|
-
|
|
26
|
-
/* https://kilianvalkhof.com/2022/css-html/your-css-reset-needs-text-size-adjust-probably/ */
|
|
27
|
-
-moz-text-size-adjust: none;
|
|
28
|
-
-webkit-text-size-adjust: none;
|
|
29
|
-
text-size-adjust: none;
|
|
30
|
-
|
|
31
|
-
@media (--motionOK) {
|
|
32
|
-
scroll-behavior: smooth;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:where(body) {
|
|
37
|
-
-moz-osx-font-smoothing: grayscale;
|
|
38
|
-
-webkit-font-smoothing: antialiased;
|
|
39
|
-
container-type: inline-size;
|
|
40
|
-
font-size: 16px;
|
|
41
|
-
font-synthesis: style;
|
|
42
|
-
font-weight: 400;
|
|
43
|
-
inline-size: 100%;
|
|
44
|
-
margin: 0;
|
|
45
|
-
min-block-size: 100%;
|
|
46
|
-
min-inline-size: 320px;
|
|
47
|
-
position: relative;
|
|
48
|
-
text-rendering: optimizeLegibility;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* TODO */
|
|
52
|
-
:where(:not(dialog, popover)) {
|
|
53
|
-
margin: 0;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
:where(:not(fieldset, progress, meter)) {
|
|
57
|
-
background-origin: border-box;
|
|
58
|
-
background-repeat: no-repeat;
|
|
59
|
-
border-style: solid;
|
|
60
|
-
border-width: 0;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
:where(fieldset) {
|
|
64
|
-
border: var(--field-border-width) solid var(--field-border-color);
|
|
65
|
-
border-radius: var(--field-border-radius);
|
|
66
|
-
padding: var(--size-3);
|
|
67
|
-
display: grid;
|
|
68
|
-
gap: var(--size-3);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
:where(input, button, textarea),
|
|
72
|
-
:where(input[type="file"])::-webkit-file-upload-button {
|
|
73
|
-
color: inherit;
|
|
74
|
-
font-size: inherit;
|
|
75
|
-
font: inherit;
|
|
76
|
-
letter-spacing: inherit;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
:where(input):-webkit-autofill,
|
|
80
|
-
:where(input):-webkit-autofill:hover,
|
|
81
|
-
:where(input):-webkit-autofill:focus,
|
|
82
|
-
:where(textarea):-webkit-autofill,
|
|
83
|
-
:where(textarea):-webkit-autofill:hover,
|
|
84
|
-
:where(textarea):-webkit-autofill:focus,
|
|
85
|
-
:where(select):-webkit-autofill,
|
|
86
|
-
:where(select):-webkit-autofill:hover,
|
|
87
|
-
:where(select):-webkit-autofill:focus,
|
|
88
|
-
:where(input):autofill,
|
|
89
|
-
:where(input):autofill:hover,
|
|
90
|
-
:where(input):autofill:focus,
|
|
91
|
-
:where(textarea):autofill,
|
|
92
|
-
:where(textarea):autofill:hover,
|
|
93
|
-
:where(textarea):autofill:focus,
|
|
94
|
-
:where(select):autofill,
|
|
95
|
-
:where(select):autofill:hover,
|
|
96
|
-
:where(select):autofill:focus {
|
|
97
|
-
-webkit-text-fill-color: var(--text-color-2);
|
|
98
|
-
-webkit-box-shadow: 0 0 0px 1e5px var(--well-1) inset;
|
|
99
|
-
transition: background-color 5000s ease-in-out 0s;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
::placeholder {
|
|
103
|
-
color: var(--text-color-2);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
::-moz-placeholder {
|
|
107
|
-
opacity: 1;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
:focus-visible {
|
|
111
|
-
/* Inverts the --_page-bg-color */
|
|
112
|
-
--_focus-visible-color: rgb(
|
|
113
|
-
from var(--_page-bg-color) calc(255 - r) calc(255 - g) calc(255 - b)
|
|
114
|
-
);
|
|
115
|
-
|
|
116
|
-
border-radius: var(--border-radius, 0px);
|
|
117
|
-
outline: 2px solid var(--_focus-visible-color);
|
|
118
|
-
outline-offset: 2px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
@media (--motionOK) {
|
|
122
|
-
:where(:focus-visible) {
|
|
123
|
-
transition: outline-offset 145ms var(--ease-2);
|
|
124
|
-
}
|
|
125
|
-
:where(:not(:active):focus-visible) {
|
|
126
|
-
transition-duration: 0.15s;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
:where(:not(:active):focus-visible) {
|
|
131
|
-
outline-offset: var(--outline-offset, 0px);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
:where(
|
|
135
|
-
a[href],
|
|
136
|
-
area,
|
|
137
|
-
button,
|
|
138
|
-
input:not(
|
|
139
|
-
[type="text"],
|
|
140
|
-
[type="email"],
|
|
141
|
-
[type="number"],
|
|
142
|
-
[type="password"],
|
|
143
|
-
[type=""],
|
|
144
|
-
[type="tel"],
|
|
145
|
-
[type="url"]
|
|
146
|
-
),
|
|
147
|
-
label[for],
|
|
148
|
-
select,
|
|
149
|
-
summary
|
|
150
|
-
) {
|
|
151
|
-
cursor: pointer;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
:where(
|
|
155
|
-
a[href],
|
|
156
|
-
area,
|
|
157
|
-
button,
|
|
158
|
-
[role="button"],
|
|
159
|
-
input,
|
|
160
|
-
label[for],
|
|
161
|
-
select,
|
|
162
|
-
summary,
|
|
163
|
-
textarea,
|
|
164
|
-
[tabindex]:not([tabindex*="-"])
|
|
165
|
-
) {
|
|
166
|
-
-webkit-tap-highlight-color: transparent;
|
|
167
|
-
touch-action: manipulation;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
:where(img, svg, video, canvas, audio, iframe, embed, object) {
|
|
171
|
-
display: block;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
:where(img, svg, video) {
|
|
175
|
-
block-size: auto;
|
|
176
|
-
max-inline-size: 100%;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
:where(svg:not([width])) {
|
|
180
|
-
inline-size: var(--size-7);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
:where(dt:not(:first-of-type)) {
|
|
184
|
-
margin-block-start: var(--size-5);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
:where(figure) {
|
|
188
|
-
display: grid;
|
|
189
|
-
gap: var(--size-2);
|
|
190
|
-
place-items: center;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
:target {
|
|
194
|
-
scroll-margin-block-start: 2rem;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
1
|
+
@layer normalize {
|
|
2
|
+
*,
|
|
3
|
+
::before,
|
|
4
|
+
::after {
|
|
5
|
+
/* Set box sizing instead of inheriting */
|
|
6
|
+
/* https://www.oddbird.net/2025/09/04/box-model/ */
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
* {
|
|
11
|
+
scrollbar-width: thin;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where(html) {
|
|
15
|
+
--_page-bg-color: var(--surface-default);
|
|
16
|
+
|
|
17
|
+
accent-color: var(--primary);
|
|
18
|
+
background-color: var(--_page-bg-color);
|
|
19
|
+
block-size: 100%;
|
|
20
|
+
caret-color: var(--primary);
|
|
21
|
+
color: var(--text-color-2);
|
|
22
|
+
font-family: var(--font-sans);
|
|
23
|
+
interpolate-size: allow-keywords;
|
|
24
|
+
line-height: var(--font-lineheight-4);
|
|
25
|
+
|
|
26
|
+
/* https://kilianvalkhof.com/2022/css-html/your-css-reset-needs-text-size-adjust-probably/ */
|
|
27
|
+
-moz-text-size-adjust: none;
|
|
28
|
+
-webkit-text-size-adjust: none;
|
|
29
|
+
text-size-adjust: none;
|
|
30
|
+
|
|
31
|
+
@media (--motionOK) {
|
|
32
|
+
scroll-behavior: smooth;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where(body) {
|
|
37
|
+
-moz-osx-font-smoothing: grayscale;
|
|
38
|
+
-webkit-font-smoothing: antialiased;
|
|
39
|
+
container-type: inline-size;
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
font-synthesis: style;
|
|
42
|
+
font-weight: 400;
|
|
43
|
+
inline-size: 100%;
|
|
44
|
+
margin: 0;
|
|
45
|
+
min-block-size: 100%;
|
|
46
|
+
min-inline-size: 320px;
|
|
47
|
+
position: relative;
|
|
48
|
+
text-rendering: optimizeLegibility;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* TODO */
|
|
52
|
+
:where(:not(dialog, popover)) {
|
|
53
|
+
margin: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:where(:not(fieldset, progress, meter)) {
|
|
57
|
+
background-origin: border-box;
|
|
58
|
+
background-repeat: no-repeat;
|
|
59
|
+
border-style: solid;
|
|
60
|
+
border-width: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:where(fieldset) {
|
|
64
|
+
border: var(--field-border-width) solid var(--field-border-color);
|
|
65
|
+
border-radius: var(--field-border-radius);
|
|
66
|
+
padding: var(--size-3);
|
|
67
|
+
display: grid;
|
|
68
|
+
gap: var(--size-3);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:where(input, button, textarea),
|
|
72
|
+
:where(input[type="file"])::-webkit-file-upload-button {
|
|
73
|
+
color: inherit;
|
|
74
|
+
font-size: inherit;
|
|
75
|
+
font: inherit;
|
|
76
|
+
letter-spacing: inherit;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:where(input):-webkit-autofill,
|
|
80
|
+
:where(input):-webkit-autofill:hover,
|
|
81
|
+
:where(input):-webkit-autofill:focus,
|
|
82
|
+
:where(textarea):-webkit-autofill,
|
|
83
|
+
:where(textarea):-webkit-autofill:hover,
|
|
84
|
+
:where(textarea):-webkit-autofill:focus,
|
|
85
|
+
:where(select):-webkit-autofill,
|
|
86
|
+
:where(select):-webkit-autofill:hover,
|
|
87
|
+
:where(select):-webkit-autofill:focus,
|
|
88
|
+
:where(input):autofill,
|
|
89
|
+
:where(input):autofill:hover,
|
|
90
|
+
:where(input):autofill:focus,
|
|
91
|
+
:where(textarea):autofill,
|
|
92
|
+
:where(textarea):autofill:hover,
|
|
93
|
+
:where(textarea):autofill:focus,
|
|
94
|
+
:where(select):autofill,
|
|
95
|
+
:where(select):autofill:hover,
|
|
96
|
+
:where(select):autofill:focus {
|
|
97
|
+
-webkit-text-fill-color: var(--text-color-2);
|
|
98
|
+
-webkit-box-shadow: 0 0 0px 1e5px var(--well-1) inset;
|
|
99
|
+
transition: background-color 5000s ease-in-out 0s;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
::placeholder {
|
|
103
|
+
color: var(--text-color-2);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
::-moz-placeholder {
|
|
107
|
+
opacity: 1;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:focus-visible {
|
|
111
|
+
/* Inverts the --_page-bg-color */
|
|
112
|
+
--_focus-visible-color: rgb(
|
|
113
|
+
from var(--_page-bg-color) calc(255 - r) calc(255 - g) calc(255 - b)
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
border-radius: var(--border-radius, 0px);
|
|
117
|
+
outline: 2px solid var(--_focus-visible-color);
|
|
118
|
+
outline-offset: 2px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (--motionOK) {
|
|
122
|
+
:where(:focus-visible) {
|
|
123
|
+
transition: outline-offset 145ms var(--ease-2);
|
|
124
|
+
}
|
|
125
|
+
:where(:not(:active):focus-visible) {
|
|
126
|
+
transition-duration: 0.15s;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:where(:not(:active):focus-visible) {
|
|
131
|
+
outline-offset: var(--outline-offset, 0px);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:where(
|
|
135
|
+
a[href],
|
|
136
|
+
area,
|
|
137
|
+
button,
|
|
138
|
+
input:not(
|
|
139
|
+
[type="text"],
|
|
140
|
+
[type="email"],
|
|
141
|
+
[type="number"],
|
|
142
|
+
[type="password"],
|
|
143
|
+
[type=""],
|
|
144
|
+
[type="tel"],
|
|
145
|
+
[type="url"]
|
|
146
|
+
),
|
|
147
|
+
label[for],
|
|
148
|
+
select,
|
|
149
|
+
summary
|
|
150
|
+
) {
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
:where(
|
|
155
|
+
a[href],
|
|
156
|
+
area,
|
|
157
|
+
button,
|
|
158
|
+
[role="button"],
|
|
159
|
+
input,
|
|
160
|
+
label[for],
|
|
161
|
+
select,
|
|
162
|
+
summary,
|
|
163
|
+
textarea,
|
|
164
|
+
[tabindex]:not([tabindex*="-"])
|
|
165
|
+
) {
|
|
166
|
+
-webkit-tap-highlight-color: transparent;
|
|
167
|
+
touch-action: manipulation;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:where(img, svg, video, canvas, audio, iframe, embed, object) {
|
|
171
|
+
display: block;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:where(img, svg, video) {
|
|
175
|
+
block-size: auto;
|
|
176
|
+
max-inline-size: 100%;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:where(svg:not([width])) {
|
|
180
|
+
inline-size: var(--size-7);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:where(dt:not(:first-of-type)) {
|
|
184
|
+
margin-block-start: var(--size-5);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:where(figure) {
|
|
188
|
+
display: grid;
|
|
189
|
+
gap: var(--size-2);
|
|
190
|
+
place-items: center;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
:target {
|
|
194
|
+
scroll-margin-block-start: 2rem;
|
|
195
|
+
}
|
|
196
|
+
}
|
package/src/core/utils.css
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
@layer utils {
|
|
2
|
-
/*
|
|
3
|
-
Screen-reader only
|
|
4
|
-
When you visibly want to hide an element but make it accessible for screen readers.
|
|
5
|
-
*/
|
|
6
|
-
.sr-only {
|
|
7
|
-
block-size: 1px;
|
|
8
|
-
clip-path: inset(50%);
|
|
9
|
-
inline-size: 1px;
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
position: absolute;
|
|
12
|
-
white-space: nowrap;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/* Hover and active effect for checkbox, radio and icon buttons */
|
|
16
|
-
:where(.checkbox input, .radio input, .icon-button) {
|
|
17
|
-
--isLTR: 1;
|
|
18
|
-
--isRTL: -1;
|
|
19
|
-
|
|
20
|
-
position: relative;
|
|
21
|
-
transform-style: preserve-3d;
|
|
22
|
-
|
|
23
|
-
&:dir(rtl) {
|
|
24
|
-
--isLTR: -1;
|
|
25
|
-
--isRTL: 1;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&:where(:not([disabled])) {
|
|
29
|
-
&:hover:before {
|
|
30
|
-
--thumb-scale: 1;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&:active:before {
|
|
34
|
-
--thumb-scale: 1.1;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&::before {
|
|
38
|
-
--thumb-scale: 0.01;
|
|
39
|
-
--highlight-size: 150%;
|
|
40
|
-
|
|
41
|
-
background-color: oklch(0.6 0 0 / 0.2);
|
|
42
|
-
block-size: var(--highlight-size);
|
|
43
|
-
clip-path: circle(50%);
|
|
44
|
-
content: "";
|
|
45
|
-
inline-size: var(--highlight-size);
|
|
46
|
-
inset-block-start: 50%;
|
|
47
|
-
inset-inline-start: 50%;
|
|
48
|
-
position: absolute;
|
|
49
|
-
transform-origin: center center;
|
|
50
|
-
transform: translateX(calc(var(--isRTL) * 50%)) translateY(-50%)
|
|
51
|
-
translateZ(-1px) scale(var(--thumb-scale));
|
|
52
|
-
will-change: transform;
|
|
53
|
-
|
|
54
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
55
|
-
transition: transform 0.2s ease;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
@layer utils {
|
|
2
|
+
/*
|
|
3
|
+
Screen-reader only
|
|
4
|
+
When you visibly want to hide an element but make it accessible for screen readers.
|
|
5
|
+
*/
|
|
6
|
+
.sr-only {
|
|
7
|
+
block-size: 1px;
|
|
8
|
+
clip-path: inset(50%);
|
|
9
|
+
inline-size: 1px;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
position: absolute;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Hover and active effect for checkbox, radio and icon buttons */
|
|
16
|
+
:where(.checkbox input, .radio input, .icon-button) {
|
|
17
|
+
--isLTR: 1;
|
|
18
|
+
--isRTL: -1;
|
|
19
|
+
|
|
20
|
+
position: relative;
|
|
21
|
+
transform-style: preserve-3d;
|
|
22
|
+
|
|
23
|
+
&:dir(rtl) {
|
|
24
|
+
--isLTR: -1;
|
|
25
|
+
--isRTL: 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:where(:not([disabled])) {
|
|
29
|
+
&:hover:before {
|
|
30
|
+
--thumb-scale: 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:active:before {
|
|
34
|
+
--thumb-scale: 1.1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&::before {
|
|
38
|
+
--thumb-scale: 0.01;
|
|
39
|
+
--highlight-size: 150%;
|
|
40
|
+
|
|
41
|
+
background-color: oklch(0.6 0 0 / 0.2);
|
|
42
|
+
block-size: var(--highlight-size);
|
|
43
|
+
clip-path: circle(50%);
|
|
44
|
+
content: "";
|
|
45
|
+
inline-size: var(--highlight-size);
|
|
46
|
+
inset-block-start: 50%;
|
|
47
|
+
inset-inline-start: 50%;
|
|
48
|
+
position: absolute;
|
|
49
|
+
transform-origin: center center;
|
|
50
|
+
transform: translateX(calc(var(--isRTL) * 50%)) translateY(-50%)
|
|
51
|
+
translateZ(-1px) scale(var(--thumb-scale));
|
|
52
|
+
will-change: transform;
|
|
53
|
+
|
|
54
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
55
|
+
transition: transform 0.2s ease;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
package/src/open-props.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Open Props
|
|
3
|
-
* Import as many props as you need here.
|
|
4
|
-
* https://unpkg.com/browse/open-props@2.0.0-beta.5/css
|
|
5
|
-
*/
|
|
6
|
-
@import "open-props/css/media-queries.css";
|
|
7
|
-
@import "open-props/index.css" layer(openprops);
|
|
8
|
-
@import "open-props/css/sizes/media.css" layer(openprops);
|
|
9
|
-
@import "open-props/css/font/lineheight.css" layer(openprops);
|
|
10
|
-
@import "open-props/hues.oklch.css" layer(openprops);
|
|
1
|
+
/*
|
|
2
|
+
* Open Props
|
|
3
|
+
* Import as many props as you need here.
|
|
4
|
+
* https://unpkg.com/browse/open-props@2.0.0-beta.5/css
|
|
5
|
+
*/
|
|
6
|
+
@import "open-props/css/media-queries.css";
|
|
7
|
+
@import "open-props/index.css" layer(openprops);
|
|
8
|
+
@import "open-props/css/sizes/media.css" layer(openprops);
|
|
9
|
+
@import "open-props/css/font/lineheight.css" layer(openprops);
|
|
10
|
+
@import "open-props/hues.oklch.css" layer(openprops);
|