opui-css 3.3.5 → 4.0.1
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/CHANGELOG.md +241 -0
- package/LICENSE +21 -21
- package/MIGRATING.md +105 -0
- package/README.md +66 -29
- package/astro/index.ts +46 -0
- package/components/AGENTS.md +247 -0
- package/components/Accordion/Accordion.astro +42 -0
- package/components/Anchor/Anchor.astro +51 -0
- package/components/Avatar/Avatar.astro +44 -0
- package/components/Badge/Badge.astro +54 -0
- package/components/Button/Button.astro +45 -0
- package/components/ButtonGroup/ButtonGroup.astro +29 -0
- package/components/Callout/Callout.astro +75 -0
- package/components/Card/Card.astro +38 -0
- package/components/Checkbox/Checkbox.astro +76 -0
- package/components/Checkbox/CheckboxInput.astro +32 -0
- package/components/Chip/Chip.astro +37 -0
- package/components/ClassicSelect/ClassicSelect.astro +83 -0
- package/components/DescriptionList/Description.astro +12 -0
- package/components/DescriptionList/DescriptionList.astro +22 -0
- package/components/DescriptionList/Item.astro +12 -0
- package/components/DescriptionList/Term.astro +12 -0
- package/components/DescriptionList/index.ts +12 -0
- package/components/Dialog/Dialog.astro +43 -0
- package/components/Divider/Divider.astro +14 -0
- package/components/Drawer/Drawer.astro +49 -0
- package/components/Drawer/DrawerFooter.astro +14 -0
- package/components/Drawer/DrawerHeader.astro +31 -0
- package/components/FieldDescription/FieldDescription.astro +13 -0
- package/components/FieldGroup/FieldGroup.astro +31 -0
- package/components/FieldLegend/FieldLegend.astro +15 -0
- package/components/FieldSet/FieldSet.astro +15 -0
- package/components/Form/Form.astro +15 -0
- package/components/IconButton/IconButton.astro +26 -0
- package/components/List/List.astro +36 -0
- package/components/ListItem/ListItem.astro +118 -0
- package/components/Progress/Progress.astro +40 -0
- package/components/Radio/Radio.astro +70 -0
- package/components/Radio/RadioInput.astro +24 -0
- package/components/Range/Range.astro +136 -0
- package/components/Select/Select.astro +106 -0
- package/components/Switch/Switch.astro +101 -0
- package/components/Switch/SwitchInput.astro +25 -0
- package/components/Table/Body.astro +13 -0
- package/components/Table/Cell.astro +13 -0
- package/components/Table/Column.astro +15 -0
- package/components/Table/ColumnGroup.astro +13 -0
- package/components/Table/Head.astro +13 -0
- package/components/Table/HeaderCell.astro +13 -0
- package/components/Table/Row.astro +13 -0
- package/components/Table/Table.astro +15 -0
- package/components/Table/index.ts +20 -0
- package/components/Tabs/Tabs.astro +28 -0
- package/components/Tabs/TabsItem.astro +47 -0
- package/components/Tabs/TabsPanel.astro +21 -0
- package/components/Tabs/TabsTab.astro +19 -0
- package/components/Tabs/index.ts +14 -0
- package/components/TextField/TextField.astro +128 -0
- package/components/Textarea/Textarea.astro +106 -0
- package/components/Toast/Toast.astro +42 -0
- package/components/ToggleButton/ToggleButton.astro +53 -0
- package/components/ToggleGroup/ToggleGroup.astro +49 -0
- package/components/Tooltip/Tooltip.astro +30 -0
- package/{src/core → core}/normalize.css +194 -196
- package/core/palette.css +59 -0
- package/{src/core → core}/utils.css +71 -60
- package/css/components/accordion.css +174 -0
- package/css/components/anchor.css +27 -0
- package/{src/themes/theme-two → css}/components/avatar.css +65 -68
- package/css/components/badge.css +107 -0
- package/css/components/button-group.css +179 -0
- package/css/components/button.css +215 -0
- package/css/components/callout.css +109 -0
- package/css/components/card.css +117 -0
- package/css/components/checkbox.css +205 -0
- package/{src/themes/theme-one → css}/components/chip.css +87 -135
- package/{src/themes/theme-two/components/definition-list.css → css/components/description-list.css} +77 -68
- package/{src/themes/theme-two → css}/components/dialog.css +68 -59
- package/css/components/divider.css +20 -0
- package/css/components/drawer.css +171 -0
- package/css/components/form.css +146 -0
- package/css/components/icon-button.css +139 -0
- package/{src/themes/theme-two → css}/components/link.css +21 -21
- package/{src/themes/theme-two → css}/components/list.css +345 -318
- package/{src/themes/theme-one → css}/components/progress.css +97 -83
- package/css/components/radio.css +172 -0
- package/css/components/range.css +337 -0
- package/{src/themes/theme-two → css}/components/select.css +169 -162
- package/{src/themes/theme-two → css}/components/spinner.css +37 -38
- package/{src/themes/theme-two → css}/components/switch.css +268 -225
- package/css/components/table.css +179 -0
- package/css/components/tabs.css +77 -0
- package/css/components/text-field.css +450 -0
- package/css/components/text-input.css +64 -0
- package/{src/themes/theme-two → css}/components/textarea.css +24 -25
- package/css/components/toast.css +161 -0
- package/css/components/toggle-button.css +87 -0
- package/css/components/toggle-group.css +56 -0
- package/css/components/tooltip.css +67 -0
- package/css/components/typography.css +585 -0
- package/{src/themes/theme-two → css}/components.css +41 -37
- package/{src/themes/theme-two → css}/imports.css +16 -16
- package/css/js/checkbox.js +21 -0
- package/css/js/toast.js +94 -0
- package/css/theme.css +132 -0
- package/dist/op.css +1001 -32
- package/dist/op.css.map +1 -0
- package/dist/opui.components.css +5146 -0
- package/dist/opui.components.css.map +1 -0
- package/dist/opui.css +6615 -0
- package/dist/opui.css.map +1 -0
- package/env.d.ts +14 -0
- package/open-props.css +9 -0
- package/package.json +81 -72
- package/dist/theme-one/components.css +0 -3869
- package/dist/theme-one/theme-one.css +0 -4424
- package/dist/theme-two/components.css +0 -3591
- package/dist/theme-two/theme-two.css +0 -4141
- package/src/open-props.css +0 -10
- package/src/themes/theme-one/components/accordion.css +0 -172
- package/src/themes/theme-one/components/alert.css +0 -85
- package/src/themes/theme-one/components/avatar.css +0 -68
- package/src/themes/theme-one/components/badge.css +0 -101
- package/src/themes/theme-one/components/button-group.css +0 -69
- package/src/themes/theme-one/components/button.css +0 -281
- package/src/themes/theme-one/components/card.css +0 -82
- package/src/themes/theme-one/components/checkbox-radio.css +0 -123
- package/src/themes/theme-one/components/definition-list.css +0 -68
- package/src/themes/theme-one/components/dialog.css +0 -59
- package/src/themes/theme-one/components/divider.css +0 -7
- package/src/themes/theme-one/components/field-group.css +0 -83
- package/src/themes/theme-one/components/field.css +0 -494
- package/src/themes/theme-one/components/icon-button.css +0 -40
- package/src/themes/theme-one/components/link.css +0 -21
- package/src/themes/theme-one/components/list.css +0 -318
- package/src/themes/theme-one/components/range.css +0 -121
- package/src/themes/theme-one/components/rich-text.css +0 -210
- package/src/themes/theme-one/components/select.css +0 -163
- package/src/themes/theme-one/components/snackbar.css +0 -148
- package/src/themes/theme-one/components/spinner.css +0 -38
- package/src/themes/theme-one/components/switch.css +0 -225
- package/src/themes/theme-one/components/tab-buttons.css +0 -120
- package/src/themes/theme-one/components/table.css +0 -92
- package/src/themes/theme-one/components/text-field.css +0 -57
- package/src/themes/theme-one/components/textarea.css +0 -25
- package/src/themes/theme-one/components/toggle-button-group.css +0 -135
- package/src/themes/theme-one/components/tooltip.css +0 -94
- package/src/themes/theme-one/components/typography.css +0 -209
- package/src/themes/theme-one/components.css +0 -37
- package/src/themes/theme-one/imports.css +0 -16
- package/src/themes/theme-one/theme.css +0 -163
- package/src/themes/theme-two/components/accordion.css +0 -172
- package/src/themes/theme-two/components/alert.css +0 -85
- package/src/themes/theme-two/components/badge.css +0 -101
- package/src/themes/theme-two/components/button-group.css +0 -50
- package/src/themes/theme-two/components/button.css +0 -229
- package/src/themes/theme-two/components/card.css +0 -82
- package/src/themes/theme-two/components/checkbox-radio.css +0 -123
- package/src/themes/theme-two/components/chip.css +0 -135
- package/src/themes/theme-two/components/divider.css +0 -7
- package/src/themes/theme-two/components/field-group.css +0 -83
- package/src/themes/theme-two/components/field.css +0 -281
- package/src/themes/theme-two/components/icon-button.css +0 -40
- package/src/themes/theme-two/components/progress.css +0 -83
- package/src/themes/theme-two/components/range.css +0 -121
- package/src/themes/theme-two/components/rich-text.css +0 -210
- package/src/themes/theme-two/components/snackbar.css +0 -148
- package/src/themes/theme-two/components/tab-buttons.css +0 -120
- package/src/themes/theme-two/components/table.css +0 -99
- package/src/themes/theme-two/components/text-field.css +0 -57
- package/src/themes/theme-two/components/toggle-button-group.css +0 -135
- package/src/themes/theme-two/components/tooltip.css +0 -94
- package/src/themes/theme-two/components/typography.css +0 -209
- package/src/themes/theme-two/theme.css +0 -158
|
@@ -1,196 +1,194 @@
|
|
|
1
|
-
@layer normalize {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
::
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
box-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
color: var(--
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
text-size-adjust: none;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
font-
|
|
41
|
-
|
|
42
|
-
font-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
border-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
:where(
|
|
85
|
-
:where(
|
|
86
|
-
:where(
|
|
87
|
-
:where(
|
|
88
|
-
:where(
|
|
89
|
-
:where(
|
|
90
|
-
:where(
|
|
91
|
-
:where(
|
|
92
|
-
:where(
|
|
93
|
-
:where(
|
|
94
|
-
:where(
|
|
95
|
-
:where(
|
|
96
|
-
:where(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
:where(:
|
|
126
|
-
transition
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
:where(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
) {
|
|
151
|
-
cursor: pointer;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
:where(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
}
|
|
1
|
+
@layer normalize {
|
|
2
|
+
|
|
3
|
+
*,
|
|
4
|
+
::before,
|
|
5
|
+
::after {
|
|
6
|
+
/* Set box sizing instead of inheriting */
|
|
7
|
+
/* https://www.oddbird.net/2025/09/04/box-model/ */
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
* {
|
|
12
|
+
scrollbar-width: thin;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where(html) {
|
|
16
|
+
--_page-bg-color: var(--surface-default);
|
|
17
|
+
|
|
18
|
+
accent-color: var(--primary);
|
|
19
|
+
background-color: var(--_page-bg-color);
|
|
20
|
+
block-size: 100%;
|
|
21
|
+
caret-color: var(--primary);
|
|
22
|
+
color: var(--text-muted, var(--text-color-2));
|
|
23
|
+
/* text-color-2 is for backwards compatibility */
|
|
24
|
+
font-family: var(--font-sans);
|
|
25
|
+
interpolate-size: allow-keywords;
|
|
26
|
+
line-height: var(--font-lineheight-4);
|
|
27
|
+
|
|
28
|
+
/* https://kilianvalkhof.com/2022/css-html/your-css-reset-needs-text-size-adjust-probably/ */
|
|
29
|
+
-moz-text-size-adjust: none;
|
|
30
|
+
-webkit-text-size-adjust: none;
|
|
31
|
+
text-size-adjust: none;
|
|
32
|
+
|
|
33
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
34
|
+
scroll-behavior: smooth;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where(body) {
|
|
39
|
+
-moz-osx-font-smoothing: grayscale;
|
|
40
|
+
-webkit-font-smoothing: antialiased;
|
|
41
|
+
container-type: inline-size;
|
|
42
|
+
font-size: 16px;
|
|
43
|
+
font-synthesis: style;
|
|
44
|
+
font-weight: 400;
|
|
45
|
+
inline-size: 100%;
|
|
46
|
+
margin: 0;
|
|
47
|
+
min-block-size: 100%;
|
|
48
|
+
min-inline-size: 320px;
|
|
49
|
+
position: relative;
|
|
50
|
+
text-rendering: optimizeLegibility;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:where(:not(dialog, popover)) {
|
|
54
|
+
margin: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:where(dialog:not([open])) {
|
|
58
|
+
outline: none !important;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
:where(:not(fieldset, progress, meter)) {
|
|
63
|
+
background-origin: border-box;
|
|
64
|
+
background-repeat: no-repeat;
|
|
65
|
+
border-style: solid;
|
|
66
|
+
border-width: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:where(fieldset) {
|
|
70
|
+
border: var(--field-border-width) solid var(--field-border-color);
|
|
71
|
+
border-radius: var(--field-border-radius);
|
|
72
|
+
padding: var(--size-3);
|
|
73
|
+
display: grid;
|
|
74
|
+
gap: var(--size-3);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:where(input, button, textarea),
|
|
78
|
+
:where(input[type="file"])::-webkit-file-upload-button {
|
|
79
|
+
color: inherit;
|
|
80
|
+
font: inherit;
|
|
81
|
+
letter-spacing: inherit;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:where(input):-webkit-autofill,
|
|
85
|
+
:where(input):-webkit-autofill:hover,
|
|
86
|
+
:where(input):-webkit-autofill:focus,
|
|
87
|
+
:where(textarea):-webkit-autofill,
|
|
88
|
+
:where(textarea):-webkit-autofill:hover,
|
|
89
|
+
:where(textarea):-webkit-autofill:focus,
|
|
90
|
+
:where(select):-webkit-autofill,
|
|
91
|
+
:where(select):-webkit-autofill:hover,
|
|
92
|
+
:where(select):-webkit-autofill:focus,
|
|
93
|
+
:where(input):autofill,
|
|
94
|
+
:where(input):autofill:hover,
|
|
95
|
+
:where(input):autofill:focus,
|
|
96
|
+
:where(textarea):autofill,
|
|
97
|
+
:where(textarea):autofill:hover,
|
|
98
|
+
:where(textarea):autofill:focus,
|
|
99
|
+
:where(select):autofill,
|
|
100
|
+
:where(select):autofill:hover,
|
|
101
|
+
:where(select):autofill:focus {
|
|
102
|
+
-webkit-text-fill-color: var(--text-muted, var(--text-color-2));
|
|
103
|
+
-webkit-box-shadow: 0 0 0px 1e5px var(--well-1) inset;
|
|
104
|
+
transition: background-color 5000s ease-in-out 0s;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
::placeholder {
|
|
108
|
+
color: var(--text-muted, var(--text-color-2));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
::-moz-placeholder {
|
|
112
|
+
opacity: 1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:focus-visible {
|
|
116
|
+
/* Inverts the --_page-bg-color */
|
|
117
|
+
--_focus-visible-color: rgb(from var(--_page-bg-color) calc(255 - r) calc(255 - g) calc(255 - b));
|
|
118
|
+
|
|
119
|
+
border-radius: var(--border-radius, 0px);
|
|
120
|
+
outline: 2px solid var(--_focus-visible-color);
|
|
121
|
+
outline-offset: 2px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
125
|
+
:where(:focus-visible) {
|
|
126
|
+
transition: outline-offset .15 var(--ease-2);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:where(:not(:active):focus-visible) {
|
|
130
|
+
transition-duration: 0.15s;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:where(:not(:active):focus-visible) {
|
|
135
|
+
outline-offset: var(--outline-offset, 0px);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:where(a[href],
|
|
139
|
+
area,
|
|
140
|
+
button,
|
|
141
|
+
input:not([type="text"],
|
|
142
|
+
[type="email"],
|
|
143
|
+
[type="number"],
|
|
144
|
+
[type="password"],
|
|
145
|
+
[type=""],
|
|
146
|
+
[type="tel"],
|
|
147
|
+
[type="url"]),
|
|
148
|
+
label[for],
|
|
149
|
+
select,
|
|
150
|
+
summary) {
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
:where(a[href],
|
|
155
|
+
area,
|
|
156
|
+
button,
|
|
157
|
+
[role="button"],
|
|
158
|
+
input,
|
|
159
|
+
label[for],
|
|
160
|
+
select,
|
|
161
|
+
summary,
|
|
162
|
+
textarea,
|
|
163
|
+
[tabindex]:not([tabindex*="-"])) {
|
|
164
|
+
-webkit-tap-highlight-color: transparent;
|
|
165
|
+
touch-action: manipulation;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:where(img, svg, video, canvas, audio, iframe, embed, object) {
|
|
169
|
+
display: block;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:where(img, svg, video) {
|
|
173
|
+
block-size: auto;
|
|
174
|
+
max-inline-size: 100%;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:where(svg:not([width])) {
|
|
178
|
+
inline-size: var(--size-7);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:where(dt:not(:first-of-type)) {
|
|
182
|
+
margin-block-start: var(--size-5);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
:where(figure) {
|
|
186
|
+
display: grid;
|
|
187
|
+
gap: var(--size-2);
|
|
188
|
+
place-items: center;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:target {
|
|
192
|
+
scroll-margin-block-start: 2rem;
|
|
193
|
+
}
|
|
194
|
+
}
|
package/core/palette.css
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
:where(:root) {
|
|
2
|
+
--palette-hue: 250;
|
|
3
|
+
/* <angle */
|
|
4
|
+
--palette-hue-rotate-by: 0;
|
|
5
|
+
/* +- deg : warm or cool the palette */
|
|
6
|
+
--palette-chroma: 0.15;
|
|
7
|
+
/* 0-1 : lower to mute and pastel, over 2 at own risk */
|
|
8
|
+
|
|
9
|
+
/* New API: a single OKLCH source that drives the entire ramp.
|
|
10
|
+
The default below derives from the legacy --palette-hue / --palette-chroma
|
|
11
|
+
vars so themes that haven't migrated keep working unchanged. Themes opting
|
|
12
|
+
into the new API just set --palette-source directly. */
|
|
13
|
+
--palette-source: oklch(58% calc(0.21 * var(--palette-chroma, 1)) var(--palette-hue, 250));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
* {
|
|
17
|
+
--color-1: oklch(from var(--palette-source) 98% calc(0.03 * (c / 0.21)) calc(h + (0 * var(--palette-hue-rotate-by))));
|
|
18
|
+
--color-2: oklch(from var(--palette-source) 97% calc(0.06 * (c / 0.21)) calc(h + (1 * var(--palette-hue-rotate-by))));
|
|
19
|
+
--color-3: oklch(from var(--palette-source) 93% calc(0.1 * (c / 0.21)) calc(h + (2 * var(--palette-hue-rotate-by))));
|
|
20
|
+
--color-4: oklch(from var(--palette-source) 84% calc(0.12 * (c / 0.21)) calc(h + (3 * var(--palette-hue-rotate-by))));
|
|
21
|
+
--color-5: oklch(from var(--palette-source) 80% calc(0.16 * (c / 0.21)) calc(h + (4 * var(--palette-hue-rotate-by))));
|
|
22
|
+
--color-6: oklch(from var(--palette-source) 71% calc(0.19 * (c / 0.21)) calc(h + (5 * var(--palette-hue-rotate-by))));
|
|
23
|
+
--color-7: oklch(from var(--palette-source) 66% calc(0.2 * (c / 0.21)) calc(h + (6 * var(--palette-hue-rotate-by))));
|
|
24
|
+
--color-8: oklch(from var(--palette-source) 58% calc(0.21 * (c / 0.21)) calc(h + (7 * var(--palette-hue-rotate-by))));
|
|
25
|
+
--color-9: oklch(from var(--palette-source) 53% calc(0.2 * (c / 0.21)) calc(h + (8 * var(--palette-hue-rotate-by))));
|
|
26
|
+
--color-10: oklch(from var(--palette-source) 49% calc(0.19 * (c / 0.21)) calc(h + (9 * var(--palette-hue-rotate-by))));
|
|
27
|
+
--color-11: oklch(from var(--palette-source) 42% calc(0.17 * (c / 0.21)) calc(h + (10 * var(--palette-hue-rotate-by))));
|
|
28
|
+
--color-12: oklch(from var(--palette-source) 35% calc(0.15 * (c / 0.21)) calc(h + (11 * var(--palette-hue-rotate-by))));
|
|
29
|
+
--color-13: oklch(from var(--palette-source) 27% calc(0.12 * (c / 0.21)) calc(h + (12 * var(--palette-hue-rotate-by))));
|
|
30
|
+
--color-14: oklch(from var(--palette-source) 20% calc(0.09 * (c / 0.21)) calc(h + (13 * var(--palette-hue-rotate-by))));
|
|
31
|
+
--color-15: oklch(from var(--palette-source) 16% calc(0.07 * (c / 0.21)) calc(h + (14 * var(--palette-hue-rotate-by))));
|
|
32
|
+
--color-16: oklch(from var(--palette-source) 10% calc(0.05 * (c / 0.21)) calc(h + (15 * var(--palette-hue-rotate-by))));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Gray ramp — derived from each --color-N step so it shares the palette's
|
|
36
|
+
per-step lightness curve. --gray-chroma / --gray-hue follow the Open Props
|
|
37
|
+
convention (hue is the third oklch arg, NOT lightness). Override either
|
|
38
|
+
in a theme to warm/cool the grays without redefining each --gray-N. */
|
|
39
|
+
* {
|
|
40
|
+
--gray-chroma: 0.01;
|
|
41
|
+
--gray-hue: 255;
|
|
42
|
+
|
|
43
|
+
--gray-1: oklch(from var(--color-1) l var(--gray-chroma) var(--gray-hue));
|
|
44
|
+
--gray-2: oklch(from var(--color-2) l var(--gray-chroma) var(--gray-hue));
|
|
45
|
+
--gray-3: oklch(from var(--color-3) l var(--gray-chroma) var(--gray-hue));
|
|
46
|
+
--gray-4: oklch(from var(--color-4) l var(--gray-chroma) var(--gray-hue));
|
|
47
|
+
--gray-5: oklch(from var(--color-5) l var(--gray-chroma) var(--gray-hue));
|
|
48
|
+
--gray-6: oklch(from var(--color-6) l var(--gray-chroma) var(--gray-hue));
|
|
49
|
+
--gray-7: oklch(from var(--color-7) l var(--gray-chroma) var(--gray-hue));
|
|
50
|
+
--gray-8: oklch(from var(--color-8) l var(--gray-chroma) var(--gray-hue));
|
|
51
|
+
--gray-9: oklch(from var(--color-9) l var(--gray-chroma) var(--gray-hue));
|
|
52
|
+
--gray-10: oklch(from var(--color-10) l var(--gray-chroma) var(--gray-hue));
|
|
53
|
+
--gray-11: oklch(from var(--color-11) l var(--gray-chroma) var(--gray-hue));
|
|
54
|
+
--gray-12: oklch(from var(--color-12) l var(--gray-chroma) var(--gray-hue));
|
|
55
|
+
--gray-13: oklch(from var(--color-13) l var(--gray-chroma) var(--gray-hue));
|
|
56
|
+
--gray-14: oklch(from var(--color-14) l var(--gray-chroma) var(--gray-hue));
|
|
57
|
+
--gray-15: oklch(from var(--color-15) l var(--gray-chroma) var(--gray-hue));
|
|
58
|
+
--gray-16: oklch(from var(--color-16) l var(--gray-chroma) var(--gray-hue));
|
|
59
|
+
}
|
|
@@ -1,60 +1,71 @@
|
|
|
1
|
-
@layer utils {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
@layer utils {
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Screen-reader only
|
|
5
|
+
When you visibly want to hide an element but make it accessible for screen readers.
|
|
6
|
+
*/
|
|
7
|
+
.sr-only {
|
|
8
|
+
block-size: 1px;
|
|
9
|
+
clip-path: inset(50%);
|
|
10
|
+
inline-size: 1px;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
position: absolute;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
Scroll-lock
|
|
18
|
+
Add `.scroll-lock` to any element that uses the [open] attribute (native <dialog>,
|
|
19
|
+
<details>, or any custom element). When that element is open, the page is locked.
|
|
20
|
+
*/
|
|
21
|
+
html:has(.scroll-lock[open]) {
|
|
22
|
+
overflow: clip;
|
|
23
|
+
overscroll-behavior: contain;
|
|
24
|
+
scrollbar-gutter: stable;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Hover and active effect for checkbox, radio and icon buttons */
|
|
28
|
+
:where(.checkbox input, .radio input, .icon-button) {
|
|
29
|
+
--isLTR: 1;
|
|
30
|
+
--isRTL: -1;
|
|
31
|
+
|
|
32
|
+
position: relative;
|
|
33
|
+
transform-style: preserve-3d;
|
|
34
|
+
|
|
35
|
+
&:dir(rtl) {
|
|
36
|
+
--isLTR: -1;
|
|
37
|
+
--isRTL: 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:where(:not([disabled])) {
|
|
41
|
+
&:hover:before {
|
|
42
|
+
--thumb-scale: 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:active:before {
|
|
46
|
+
--thumb-scale: 1.1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&::before {
|
|
50
|
+
--thumb-scale: 0.01;
|
|
51
|
+
--highlight-size: 150%;
|
|
52
|
+
|
|
53
|
+
background-color: oklch(0.6 0 0 / 0.2);
|
|
54
|
+
block-size: var(--highlight-size);
|
|
55
|
+
clip-path: circle(50%);
|
|
56
|
+
content: "";
|
|
57
|
+
inline-size: var(--highlight-size);
|
|
58
|
+
inset-block-start: 50%;
|
|
59
|
+
inset-inline-start: 50%;
|
|
60
|
+
position: absolute;
|
|
61
|
+
transform-origin: center center;
|
|
62
|
+
transform: translateX(calc(var(--isRTL) * 50%)) translateY(-50%) translateZ(-1px) scale(var(--thumb-scale));
|
|
63
|
+
will-change: transform;
|
|
64
|
+
|
|
65
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
66
|
+
transition: transform 0.2s ease;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|