opui-css 4.1.0 → 5.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 +282 -247
- package/LICENSE +21 -21
- package/MIGRATING.md +127 -105
- package/README.md +87 -87
- package/astro/index.ts +46 -46
- package/components/AGENTS.md +248 -247
- package/components/Accordion/Accordion.astro +42 -42
- package/components/Anchor/Anchor.astro +51 -51
- package/components/Avatar/Avatar.astro +38 -44
- package/components/Badge/Badge.astro +59 -54
- package/components/Button/Button.astro +45 -45
- package/components/ButtonGroup/ButtonGroup.astro +29 -29
- package/components/Callout/Callout.astro +75 -75
- package/components/Card/Card.astro +36 -36
- package/components/Checkbox/Checkbox.astro +76 -76
- package/components/Checkbox/CheckboxInput.astro +32 -32
- package/components/Chip/Chip.astro +37 -37
- package/components/ClassicSelect/ClassicSelect.astro +83 -83
- package/components/DescriptionList/Description.astro +12 -12
- package/components/DescriptionList/DescriptionList.astro +22 -22
- package/components/DescriptionList/Item.astro +12 -12
- package/components/DescriptionList/Term.astro +12 -12
- package/components/DescriptionList/index.ts +12 -12
- package/components/Dialog/Dialog.astro +41 -41
- package/components/Divider/Divider.astro +17 -14
- package/components/Drawer/Drawer.astro +49 -49
- package/components/Drawer/DrawerFooter.astro +14 -14
- package/components/Drawer/DrawerHeader.astro +31 -31
- package/components/FieldDescription/FieldDescription.astro +13 -13
- package/components/FieldGroup/FieldGroup.astro +31 -31
- package/components/FieldLegend/FieldLegend.astro +15 -15
- package/components/FieldSet/FieldSet.astro +15 -15
- package/components/Form/Form.astro +15 -15
- package/components/IconButton/IconButton.astro +26 -26
- package/components/List/List.astro +36 -36
- package/components/ListItem/ListItem.astro +118 -118
- package/components/Progress/Progress.astro +41 -40
- package/components/Radio/Radio.astro +70 -70
- package/components/Radio/RadioInput.astro +24 -24
- package/components/Range/Range.astro +136 -136
- package/components/Select/Select.astro +106 -106
- package/components/Switch/Switch.astro +101 -101
- package/components/Switch/SwitchInput.astro +25 -25
- package/components/Table/Body.astro +13 -13
- package/components/Table/Cell.astro +13 -13
- package/components/Table/Column.astro +15 -15
- package/components/Table/ColumnGroup.astro +13 -13
- package/components/Table/Head.astro +13 -13
- package/components/Table/HeaderCell.astro +13 -13
- package/components/Table/Row.astro +13 -13
- package/components/Table/Table.astro +18 -15
- package/components/Table/index.ts +20 -20
- package/components/Tabs/Tabs.astro +28 -28
- package/components/Tabs/TabsItem.astro +47 -47
- package/components/Tabs/TabsPanel.astro +21 -21
- package/components/Tabs/TabsTab.astro +19 -19
- package/components/Tabs/index.ts +14 -14
- package/components/TextField/TextField.astro +128 -128
- package/components/Textarea/Textarea.astro +106 -106
- package/components/Toast/Toast.astro +42 -42
- package/components/ToggleButton/ToggleButton.astro +53 -53
- package/components/ToggleGroup/ToggleGroup.astro +49 -49
- package/components/Tooltip/Tooltip.astro +30 -30
- package/core/normalize.css +194 -194
- package/core/palette.css +59 -59
- package/core/utils.css +71 -71
- package/css/components/accordion.css +174 -174
- package/css/components/anchor.css +27 -27
- package/css/components/avatar.css +65 -65
- package/css/components/badge.css +107 -107
- package/css/components/button-group.css +179 -179
- package/css/components/button.css +215 -215
- package/css/components/callout.css +109 -109
- package/css/components/card.css +117 -117
- package/css/components/checkbox.css +205 -205
- package/css/components/chip.css +87 -87
- package/css/components/description-list.css +80 -77
- package/css/components/dialog.css +68 -68
- package/css/components/divider.css +20 -20
- package/css/components/drawer.css +171 -171
- package/css/components/form.css +146 -146
- package/css/components/icon-button.css +139 -139
- package/css/components/link.css +21 -21
- package/css/components/list.css +345 -345
- package/css/components/progress.css +102 -97
- package/css/components/radio.css +172 -172
- package/css/components/range.css +337 -337
- package/css/components/select.css +169 -169
- package/css/components/spinner.css +37 -37
- package/css/components/switch.css +268 -268
- package/css/components/table.css +179 -179
- package/css/components/tabs.css +83 -77
- package/css/components/text-field.css +450 -450
- package/css/components/text-input.css +64 -64
- package/css/components/textarea.css +24 -24
- package/css/components/toast.css +161 -161
- package/css/components/toggle-button.css +87 -87
- package/css/components/toggle-group.css +56 -56
- package/css/components/tooltip.css +67 -67
- package/css/components/typography.css +585 -585
- package/css/components.css +41 -41
- package/css/imports.css +16 -16
- package/css/js/checkbox.js +21 -21
- package/css/js/toast.js +94 -94
- package/css/theme.css +132 -132
- package/dist/op.css +65 -65
- package/dist/op.css.map +1 -1
- package/dist/opui.components.css +5159 -5145
- package/dist/opui.components.css.map +1 -1
- package/dist/opui.css +5668 -5654
- package/dist/opui.css.map +1 -1
- package/env.d.ts +14 -14
- package/open-props.css +9 -9
- package/package.json +81 -81
|
@@ -1,97 +1,102 @@
|
|
|
1
|
-
@layer components.root {
|
|
2
|
-
:where(progress) {
|
|
3
|
-
--_accent-color: var(--primary);
|
|
4
|
-
--_bg-color: var(--surface-tonal);
|
|
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
|
-
border
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
inset-inline-start:
|
|
89
|
-
inset-inline-end:
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
inset-inline-start: 107%;
|
|
94
|
-
inset-inline-end: -8%;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
1
|
+
@layer components.root {
|
|
2
|
+
:where(.ui-progress) {
|
|
3
|
+
--_accent-color: var(--primary);
|
|
4
|
+
--_bg-color: var(--surface-tonal);
|
|
5
|
+
|
|
6
|
+
background-color: var(--_bg-color);
|
|
7
|
+
block-size: var(--size-1);
|
|
8
|
+
border-radius: var(--border-radius, 0.25rem);
|
|
9
|
+
display: inline-block;
|
|
10
|
+
inline-size: 100%;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
position: relative;
|
|
13
|
+
vertical-align: baseline;
|
|
14
|
+
|
|
15
|
+
/* Color */
|
|
16
|
+
&.ui-filled {
|
|
17
|
+
--_bg-color: var(--surface-filled);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.ui-default {
|
|
21
|
+
--_bg-color: var(--surface-default);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.ui-tonal {
|
|
25
|
+
--_bg-color: var(--surface-tonal);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&>progress {
|
|
29
|
+
appearance: none;
|
|
30
|
+
background: none;
|
|
31
|
+
block-size: 100%;
|
|
32
|
+
border: 0;
|
|
33
|
+
display: block;
|
|
34
|
+
inline-size: 100%;
|
|
35
|
+
|
|
36
|
+
&::-webkit-progress-bar {
|
|
37
|
+
background: none;
|
|
38
|
+
border-radius: var(--border-radius, 0.25rem);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&[value]::-webkit-progress-value {
|
|
42
|
+
background-color: var(--_accent-color);
|
|
43
|
+
|
|
44
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
45
|
+
transition: inline-size 0.2s var(--ease-out-4, cubic-bezier(0, 0, 0.1, 1));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&::-moz-progress-bar {
|
|
50
|
+
background-color: var(--_accent-color);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
56
|
+
:where(.ui-progress):has(> progress:indeterminate) {
|
|
57
|
+
&::after {
|
|
58
|
+
animation: indeterminate 2s linear infinite;
|
|
59
|
+
background-color: var(--_accent-color);
|
|
60
|
+
content: "";
|
|
61
|
+
inset: 0 auto 0 0;
|
|
62
|
+
position: absolute;
|
|
63
|
+
will-change: inset-inline-start, inset-inline-end;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&>progress {
|
|
67
|
+
&::-webkit-progress-value {
|
|
68
|
+
background-color: transparent;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&::-moz-progress-bar {
|
|
72
|
+
background-color: transparent;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
[dir="rtl"] {
|
|
78
|
+
:where(.ui-progress):has(> progress:indeterminate) {
|
|
79
|
+
&::after {
|
|
80
|
+
animation-direction: reverse;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@keyframes indeterminate {
|
|
87
|
+
0% {
|
|
88
|
+
inset-inline-start: -200%;
|
|
89
|
+
inset-inline-end: 100%;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
60% {
|
|
93
|
+
inset-inline-start: 107%;
|
|
94
|
+
inset-inline-end: -8%;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
100% {
|
|
98
|
+
inset-inline-start: 107%;
|
|
99
|
+
inset-inline-end: -8%;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
package/css/components/radio.css
CHANGED
|
@@ -1,172 +1,172 @@
|
|
|
1
|
-
@layer components.root {
|
|
2
|
-
label.radio {
|
|
3
|
-
--_input-size: 1.125rem;
|
|
4
|
-
--_indicator-size: 50%;
|
|
5
|
-
|
|
6
|
-
align-items: center;
|
|
7
|
-
color: var(--text-primary);
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
display: inline-grid;
|
|
10
|
-
gap: 0 var(--size-2);
|
|
11
|
-
grid-auto-columns: auto;
|
|
12
|
-
grid-auto-flow: column;
|
|
13
|
-
inline-size: fit-content;
|
|
14
|
-
line-height: 1.5;
|
|
15
|
-
transform: translateZ(0);
|
|
16
|
-
user-select: none;
|
|
17
|
-
|
|
18
|
-
/* Disabled */
|
|
19
|
-
&:has([disabled]) {
|
|
20
|
-
cursor: not-allowed;
|
|
21
|
-
opacity: 0.64;
|
|
22
|
-
user-select: none;
|
|
23
|
-
|
|
24
|
-
input {
|
|
25
|
-
cursor: not-allowed;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/* Required dot */
|
|
30
|
-
&:has(:invalid) {
|
|
31
|
-
.label:after {
|
|
32
|
-
color: var(--red);
|
|
33
|
-
content: "*";
|
|
34
|
-
inset: 0 -0.25ex auto auto;
|
|
35
|
-
position: absolute;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* Label */
|
|
40
|
-
.label {
|
|
41
|
-
color: var(--text-primary);
|
|
42
|
-
font-size: var(--font-size-05);
|
|
43
|
-
grid-column: 2;
|
|
44
|
-
grid-row: 1;
|
|
45
|
-
padding-inline: 0 1ex;
|
|
46
|
-
position: relative;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/* End text */
|
|
50
|
-
:where(.end-text) {
|
|
51
|
-
color: var(--text-muted);
|
|
52
|
-
font-size: var(--font-size-0);
|
|
53
|
-
grid-column: 2;
|
|
54
|
-
grid-row: 2;
|
|
55
|
-
line-height: 1.5;
|
|
56
|
-
z-index: 1;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* Stacked layout */
|
|
60
|
-
&.stack {
|
|
61
|
-
grid-auto-columns: unset;
|
|
62
|
-
justify-items: center;
|
|
63
|
-
|
|
64
|
-
.label {
|
|
65
|
-
grid-column: 1/-1;
|
|
66
|
-
grid-row: 2;
|
|
67
|
-
margin-block-start: var(--size-1);
|
|
68
|
-
padding-inline: 1ex;
|
|
69
|
-
|
|
70
|
-
/* Required dot */
|
|
71
|
-
&::after {
|
|
72
|
-
inset: 0 -0.25ex auto auto;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.end-text {
|
|
77
|
-
grid-column: 1/-1;
|
|
78
|
-
grid-row: 3;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/* Input */
|
|
83
|
-
input[type="radio"] {
|
|
84
|
-
appearance: none;
|
|
85
|
-
aspect-ratio: 1;
|
|
86
|
-
background-color: var(--surface-default);
|
|
87
|
-
block-size: var(--_input-size);
|
|
88
|
-
border: 1px solid var(--field-border-color);
|
|
89
|
-
border-radius: var(--radius-round);
|
|
90
|
-
box-sizing: border-box;
|
|
91
|
-
cursor: pointer;
|
|
92
|
-
display: grid;
|
|
93
|
-
inline-size: var(--_input-size);
|
|
94
|
-
margin: 0;
|
|
95
|
-
padding: 0;
|
|
96
|
-
place-items: center;
|
|
97
|
-
position: relative;
|
|
98
|
-
|
|
99
|
-
&:checked {
|
|
100
|
-
background-color: var(--primary);
|
|
101
|
-
border-color: var(--primary);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/* Dot */
|
|
105
|
-
&::after {
|
|
106
|
-
background-color: var(--primary-contrast);
|
|
107
|
-
block-size: var(--_indicator-size);
|
|
108
|
-
border-radius: var(--radius-round);
|
|
109
|
-
content: "";
|
|
110
|
-
inline-size: var(--_indicator-size);
|
|
111
|
-
margin: auto;
|
|
112
|
-
opacity: 0;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&:checked::after {
|
|
116
|
-
opacity: 1;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
&::before {
|
|
120
|
-
--highlight-size: 175%;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/* Sizes */
|
|
125
|
-
&.small {
|
|
126
|
-
input[type="radio"] {
|
|
127
|
-
--_input-size: var(--size-3);
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
&.large {
|
|
133
|
-
input[type="radio"] {
|
|
134
|
-
--_input-size: var(--size-4);
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/* Validation */
|
|
140
|
-
&[data-invalid],
|
|
141
|
-
&:has(:user-invalid) {
|
|
142
|
-
--palette-source: oklch(0.58 0.21 var(--hue-red));
|
|
143
|
-
|
|
144
|
-
:where(.end-text) {
|
|
145
|
-
color: var(--primary);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/* Touch devices */
|
|
150
|
-
@media (pointer: coarse) {
|
|
151
|
-
input[type="radio"] {
|
|
152
|
-
block-size: var(--size-4);
|
|
153
|
-
inline-size: var(--size-4);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
@media (forced-colors: active) {
|
|
158
|
-
input[type="radio"] {
|
|
159
|
-
border: 1px solid CanvasText;
|
|
160
|
-
|
|
161
|
-
&:checked {
|
|
162
|
-
background-color: SelectedItem;
|
|
163
|
-
border-color: SelectedItem;
|
|
164
|
-
|
|
165
|
-
&::after {
|
|
166
|
-
background-color: SelectedItemText;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
1
|
+
@layer components.root {
|
|
2
|
+
label.ui-radio {
|
|
3
|
+
--_input-size: 1.125rem;
|
|
4
|
+
--_indicator-size: 50%;
|
|
5
|
+
|
|
6
|
+
align-items: center;
|
|
7
|
+
color: var(--text-primary);
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
display: inline-grid;
|
|
10
|
+
gap: 0 var(--size-2);
|
|
11
|
+
grid-auto-columns: auto;
|
|
12
|
+
grid-auto-flow: column;
|
|
13
|
+
inline-size: fit-content;
|
|
14
|
+
line-height: 1.5;
|
|
15
|
+
transform: translateZ(0);
|
|
16
|
+
user-select: none;
|
|
17
|
+
|
|
18
|
+
/* Disabled */
|
|
19
|
+
&:has([disabled]) {
|
|
20
|
+
cursor: not-allowed;
|
|
21
|
+
opacity: 0.64;
|
|
22
|
+
user-select: none;
|
|
23
|
+
|
|
24
|
+
input {
|
|
25
|
+
cursor: not-allowed;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Required dot */
|
|
30
|
+
&:has(:invalid) {
|
|
31
|
+
.ui-label:after {
|
|
32
|
+
color: var(--red);
|
|
33
|
+
content: "*";
|
|
34
|
+
inset: 0 -0.25ex auto auto;
|
|
35
|
+
position: absolute;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Label */
|
|
40
|
+
.ui-label {
|
|
41
|
+
color: var(--text-primary);
|
|
42
|
+
font-size: var(--font-size-05);
|
|
43
|
+
grid-column: 2;
|
|
44
|
+
grid-row: 1;
|
|
45
|
+
padding-inline: 0 1ex;
|
|
46
|
+
position: relative;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* End text */
|
|
50
|
+
:where(.ui-end-text) {
|
|
51
|
+
color: var(--text-muted);
|
|
52
|
+
font-size: var(--font-size-0);
|
|
53
|
+
grid-column: 2;
|
|
54
|
+
grid-row: 2;
|
|
55
|
+
line-height: 1.5;
|
|
56
|
+
z-index: 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Stacked layout */
|
|
60
|
+
&.ui-stack {
|
|
61
|
+
grid-auto-columns: unset;
|
|
62
|
+
justify-items: center;
|
|
63
|
+
|
|
64
|
+
.ui-label {
|
|
65
|
+
grid-column: 1/-1;
|
|
66
|
+
grid-row: 2;
|
|
67
|
+
margin-block-start: var(--size-1);
|
|
68
|
+
padding-inline: 1ex;
|
|
69
|
+
|
|
70
|
+
/* Required dot */
|
|
71
|
+
&::after {
|
|
72
|
+
inset: 0 -0.25ex auto auto;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ui-end-text {
|
|
77
|
+
grid-column: 1/-1;
|
|
78
|
+
grid-row: 3;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Input */
|
|
83
|
+
input[type="radio"] {
|
|
84
|
+
appearance: none;
|
|
85
|
+
aspect-ratio: 1;
|
|
86
|
+
background-color: var(--surface-default);
|
|
87
|
+
block-size: var(--_input-size);
|
|
88
|
+
border: 1px solid var(--field-border-color);
|
|
89
|
+
border-radius: var(--radius-round);
|
|
90
|
+
box-sizing: border-box;
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
display: grid;
|
|
93
|
+
inline-size: var(--_input-size);
|
|
94
|
+
margin: 0;
|
|
95
|
+
padding: 0;
|
|
96
|
+
place-items: center;
|
|
97
|
+
position: relative;
|
|
98
|
+
|
|
99
|
+
&:checked {
|
|
100
|
+
background-color: var(--primary);
|
|
101
|
+
border-color: var(--primary);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Dot */
|
|
105
|
+
&::after {
|
|
106
|
+
background-color: var(--primary-contrast);
|
|
107
|
+
block-size: var(--_indicator-size);
|
|
108
|
+
border-radius: var(--radius-round);
|
|
109
|
+
content: "";
|
|
110
|
+
inline-size: var(--_indicator-size);
|
|
111
|
+
margin: auto;
|
|
112
|
+
opacity: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&:checked::after {
|
|
116
|
+
opacity: 1;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&::before {
|
|
120
|
+
--highlight-size: 175%;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Sizes */
|
|
125
|
+
&.ui-small {
|
|
126
|
+
input[type="radio"] {
|
|
127
|
+
--_input-size: var(--size-3);
|
|
128
|
+
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&.ui-large {
|
|
133
|
+
input[type="radio"] {
|
|
134
|
+
--_input-size: var(--size-4);
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Validation */
|
|
140
|
+
&[data-invalid],
|
|
141
|
+
&:has(:user-invalid) {
|
|
142
|
+
--palette-source: oklch(0.58 0.21 var(--hue-red));
|
|
143
|
+
|
|
144
|
+
:where(.ui-end-text) {
|
|
145
|
+
color: var(--primary);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Touch devices */
|
|
150
|
+
@media (pointer: coarse) {
|
|
151
|
+
input[type="radio"] {
|
|
152
|
+
block-size: var(--size-4);
|
|
153
|
+
inline-size: var(--size-4);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@media (forced-colors: active) {
|
|
158
|
+
input[type="radio"] {
|
|
159
|
+
border: 1px solid CanvasText;
|
|
160
|
+
|
|
161
|
+
&:checked {
|
|
162
|
+
background-color: SelectedItem;
|
|
163
|
+
border-color: SelectedItem;
|
|
164
|
+
|
|
165
|
+
&::after {
|
|
166
|
+
background-color: SelectedItemText;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|