opui-css 5.0.1 → 5.1.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/MIGRATING.md +11 -0
  3. package/README.md +1 -1
  4. package/components/Accordion/Accordion.astro +12 -2
  5. package/components/Anchor/Anchor.astro +5 -1
  6. package/components/ButtonGroup/ButtonGroup.astro +8 -1
  7. package/components/Card/Card.astro +3 -1
  8. package/components/Checkbox/Checkbox.astro +3 -3
  9. package/components/ClassicSelect/ClassicSelect.astro +3 -3
  10. package/components/Dialog/Dialog.astro +3 -1
  11. package/components/Radio/Radio.astro +3 -3
  12. package/components/Select/Select.astro +3 -3
  13. package/components/Switch/Switch.astro +3 -3
  14. package/components/TextField/TextField.astro +3 -3
  15. package/components/Textarea/Textarea.astro +3 -3
  16. package/core/normalize.css +16 -10
  17. package/core/palette.css +105 -54
  18. package/core/utils.css +2 -2
  19. package/css/components/accordion.css +7 -7
  20. package/css/components/anchor.css +23 -23
  21. package/css/components/badge.css +4 -4
  22. package/css/components/button-group.css +28 -14
  23. package/css/components/button.css +29 -17
  24. package/css/components/callout.css +95 -92
  25. package/css/components/card.css +6 -8
  26. package/css/components/checkbox.css +209 -203
  27. package/css/components/chip.css +11 -6
  28. package/css/components/description-list.css +2 -1
  29. package/css/components/dialog.css +2 -1
  30. package/css/components/drawer.css +167 -167
  31. package/css/components/form.css +8 -7
  32. package/css/components/icon-button.css +32 -13
  33. package/css/components/list.css +10 -12
  34. package/css/components/progress.css +4 -3
  35. package/css/components/radio.css +168 -170
  36. package/css/components/range.css +14 -9
  37. package/css/components/select.css +9 -6
  38. package/css/components/spinner.css +4 -3
  39. package/css/components/switch.css +8 -5
  40. package/css/components/table.css +4 -10
  41. package/css/components/tabs.css +17 -16
  42. package/css/components/text-field.css +9 -10
  43. package/css/components/text-input.css +8 -4
  44. package/css/components/textarea.css +3 -1
  45. package/css/components/toast.css +156 -157
  46. package/css/components/toggle-button.css +76 -72
  47. package/css/components/tooltip.css +59 -56
  48. package/css/components/typography.css +31 -31
  49. package/css/imports.css +5 -4
  50. package/css/theme.css +4 -3
  51. package/dist/op.css +0 -62
  52. package/dist/op.css.map +1 -1
  53. package/dist/opui.components.css +1259 -1184
  54. package/dist/opui.components.css.map +1 -1
  55. package/dist/opui.css +1555 -1425
  56. package/dist/opui.css.map +1 -1
  57. package/open-props.css +0 -1
  58. package/package.json +1 -1
package/dist/opui.css CHANGED
@@ -1,4 +1,4 @@
1
- @layer openprops, normalize, theme, components.root, components.extended, utils;
1
+ @layer openprops, theme, normalize, components.root, components.extended, utils;
2
2
 
3
3
  /* Open Props */
4
4
 
@@ -995,73 +995,257 @@
995
995
  }
996
996
  }
997
997
 
998
- @layer openprops{
998
+ /* Theme */
999
999
 
1000
- :where(:root) {
1001
- --palette-hue: 250;
1002
- /* <angle */
1003
- --palette-hue-rotate-by: 0;
1004
- /* +- deg : warm or cool the palette */
1005
- --palette-chroma: 0.15;
1006
- /* 0-1 : lower to mute and pastel, over 2 at own risk */
1000
+ @layer theme.palette {
1001
+ :where(
1002
+ :root,
1003
+ .ui-warning,
1004
+ .ui-critical,
1005
+ .ui-info,
1006
+ .ui-success,
1007
+ [data-invalid],
1008
+ del,
1009
+ ins,
1010
+ abbr,
1011
+ dfn,
1012
+ .ui-palette
1013
+ ) {
1014
+ --palette-hue: 250;
1015
+ --palette-hue-rotate-by: 0;
1016
+ --palette-chroma: 0.15;
1007
1017
 
1008
- /* New API: a single OKLCH source that drives the entire ramp.
1009
- The default below derives from the legacy --palette-hue / --palette-chroma
1010
- vars so themes that haven't migrated keep working unchanged. Themes opting
1011
- into the new API just set --palette-source directly. */
1012
- --palette-source: oklch(58% calc(0.21 * var(--palette-chroma, 1)) var(--palette-hue, 250));
1013
- }
1018
+ --palette-source: oklch(
1019
+ 58% calc(0.21 * var(--palette-chroma, 1)) var(--palette-hue, 250)
1020
+ );
1014
1021
 
1015
- * {
1016
- --color-1: oklch(from var(--palette-source) 98% calc(0.03 * (c / 0.21)) calc(h + (0 * var(--palette-hue-rotate-by))));
1017
- --color-2: oklch(from var(--palette-source) 97% calc(0.06 * (c / 0.21)) calc(h + (1 * var(--palette-hue-rotate-by))));
1018
- --color-3: oklch(from var(--palette-source) 93% calc(0.1 * (c / 0.21)) calc(h + (2 * var(--palette-hue-rotate-by))));
1019
- --color-4: oklch(from var(--palette-source) 84% calc(0.12 * (c / 0.21)) calc(h + (3 * var(--palette-hue-rotate-by))));
1020
- --color-5: oklch(from var(--palette-source) 80% calc(0.16 * (c / 0.21)) calc(h + (4 * var(--palette-hue-rotate-by))));
1021
- --color-6: oklch(from var(--palette-source) 71% calc(0.19 * (c / 0.21)) calc(h + (5 * var(--palette-hue-rotate-by))));
1022
- --color-7: oklch(from var(--palette-source) 66% calc(0.2 * (c / 0.21)) calc(h + (6 * var(--palette-hue-rotate-by))));
1023
- --color-8: oklch(from var(--palette-source) 58% calc(0.21 * (c / 0.21)) calc(h + (7 * var(--palette-hue-rotate-by))));
1024
- --color-9: oklch(from var(--palette-source) 53% calc(0.2 * (c / 0.21)) calc(h + (8 * var(--palette-hue-rotate-by))));
1025
- --color-10: oklch(from var(--palette-source) 49% calc(0.19 * (c / 0.21)) calc(h + (9 * var(--palette-hue-rotate-by))));
1026
- --color-11: oklch(from var(--palette-source) 42% calc(0.17 * (c / 0.21)) calc(h + (10 * var(--palette-hue-rotate-by))));
1027
- --color-12: oklch(from var(--palette-source) 35% calc(0.15 * (c / 0.21)) calc(h + (11 * var(--palette-hue-rotate-by))));
1028
- --color-13: oklch(from var(--palette-source) 27% calc(0.12 * (c / 0.21)) calc(h + (12 * var(--palette-hue-rotate-by))));
1029
- --color-14: oklch(from var(--palette-source) 20% calc(0.09 * (c / 0.21)) calc(h + (13 * var(--palette-hue-rotate-by))));
1030
- --color-15: oklch(from var(--palette-source) 16% calc(0.07 * (c / 0.21)) calc(h + (14 * var(--palette-hue-rotate-by))));
1031
- --color-16: oklch(from var(--palette-source) 10% calc(0.05 * (c / 0.21)) calc(h + (15 * var(--palette-hue-rotate-by))));
1032
- }
1022
+ /* Colors */
1023
+ --color-1: oklch(
1024
+ from var(--palette-source) 98% calc(0.03 * (c / 0.21))
1025
+ calc(h + (0 * var(--palette-hue-rotate-by)))
1026
+ );
1027
+ --color-2: oklch(
1028
+ from var(--palette-source) 97% calc(0.06 * (c / 0.21))
1029
+ calc(h + (1 * var(--palette-hue-rotate-by)))
1030
+ );
1031
+ --color-3: oklch(
1032
+ from var(--palette-source) 93% calc(0.1 * (c / 0.21))
1033
+ calc(h + (2 * var(--palette-hue-rotate-by)))
1034
+ );
1035
+ --color-4: oklch(
1036
+ from var(--palette-source) 84% calc(0.12 * (c / 0.21))
1037
+ calc(h + (3 * var(--palette-hue-rotate-by)))
1038
+ );
1039
+ --color-5: oklch(
1040
+ from var(--palette-source) 80% calc(0.16 * (c / 0.21))
1041
+ calc(h + (4 * var(--palette-hue-rotate-by)))
1042
+ );
1043
+ --color-6: oklch(
1044
+ from var(--palette-source) 71% calc(0.19 * (c / 0.21))
1045
+ calc(h + (5 * var(--palette-hue-rotate-by)))
1046
+ );
1047
+ --color-7: oklch(
1048
+ from var(--palette-source) 66% calc(0.2 * (c / 0.21))
1049
+ calc(h + (6 * var(--palette-hue-rotate-by)))
1050
+ );
1051
+ --color-8: oklch(
1052
+ from var(--palette-source) 58% calc(0.21 * (c / 0.21))
1053
+ calc(h + (7 * var(--palette-hue-rotate-by)))
1054
+ );
1055
+ --color-9: oklch(
1056
+ from var(--palette-source) 53% calc(0.2 * (c / 0.21))
1057
+ calc(h + (8 * var(--palette-hue-rotate-by)))
1058
+ );
1059
+ --color-10: oklch(
1060
+ from var(--palette-source) 49% calc(0.19 * (c / 0.21))
1061
+ calc(h + (9 * var(--palette-hue-rotate-by)))
1062
+ );
1063
+ --color-11: oklch(
1064
+ from var(--palette-source) 42% calc(0.17 * (c / 0.21))
1065
+ calc(h + (10 * var(--palette-hue-rotate-by)))
1066
+ );
1067
+ --color-12: oklch(
1068
+ from var(--palette-source) 35% calc(0.15 * (c / 0.21))
1069
+ calc(h + (11 * var(--palette-hue-rotate-by)))
1070
+ );
1071
+ --color-13: oklch(
1072
+ from var(--palette-source) 27% calc(0.12 * (c / 0.21))
1073
+ calc(h + (12 * var(--palette-hue-rotate-by)))
1074
+ );
1075
+ --color-14: oklch(
1076
+ from var(--palette-source) 20% calc(0.09 * (c / 0.21))
1077
+ calc(h + (13 * var(--palette-hue-rotate-by)))
1078
+ );
1079
+ --color-15: oklch(
1080
+ from var(--palette-source) 16% calc(0.07 * (c / 0.21))
1081
+ calc(h + (14 * var(--palette-hue-rotate-by)))
1082
+ );
1083
+ --color-16: oklch(
1084
+ from var(--palette-source) 10% calc(0.05 * (c / 0.21))
1085
+ calc(h + (15 * var(--palette-hue-rotate-by)))
1086
+ );
1033
1087
 
1034
- /* Gray ramp — derived from each --color-N step so it shares the palette's
1035
- per-step lightness curve. --gray-chroma / --gray-hue follow the Open Props
1036
- convention (hue is the third oklch arg, NOT lightness). Override either
1037
- in a theme to warm/cool the grays without redefining each --gray-N. */
1038
- * {
1039
- --gray-chroma: 0.01;
1040
- --gray-hue: 255;
1041
-
1042
- --gray-1: oklch(from var(--color-1) l var(--gray-chroma) var(--gray-hue));
1043
- --gray-2: oklch(from var(--color-2) l var(--gray-chroma) var(--gray-hue));
1044
- --gray-3: oklch(from var(--color-3) l var(--gray-chroma) var(--gray-hue));
1045
- --gray-4: oklch(from var(--color-4) l var(--gray-chroma) var(--gray-hue));
1046
- --gray-5: oklch(from var(--color-5) l var(--gray-chroma) var(--gray-hue));
1047
- --gray-6: oklch(from var(--color-6) l var(--gray-chroma) var(--gray-hue));
1048
- --gray-7: oklch(from var(--color-7) l var(--gray-chroma) var(--gray-hue));
1049
- --gray-8: oklch(from var(--color-8) l var(--gray-chroma) var(--gray-hue));
1050
- --gray-9: oklch(from var(--color-9) l var(--gray-chroma) var(--gray-hue));
1051
- --gray-10: oklch(from var(--color-10) l var(--gray-chroma) var(--gray-hue));
1052
- --gray-11: oklch(from var(--color-11) l var(--gray-chroma) var(--gray-hue));
1053
- --gray-12: oklch(from var(--color-12) l var(--gray-chroma) var(--gray-hue));
1054
- --gray-13: oklch(from var(--color-13) l var(--gray-chroma) var(--gray-hue));
1055
- --gray-14: oklch(from var(--color-14) l var(--gray-chroma) var(--gray-hue));
1056
- --gray-15: oklch(from var(--color-15) l var(--gray-chroma) var(--gray-hue));
1057
- --gray-16: oklch(from var(--color-16) l var(--gray-chroma) var(--gray-hue));
1088
+ /* Grays */
1089
+ --gray-chroma: 0.01;
1090
+ --gray-hue: 255;
1091
+
1092
+ --gray-1: oklch(from var(--color-1) l var(--gray-chroma) var(--gray-hue));
1093
+ --gray-2: oklch(from var(--color-2) l var(--gray-chroma) var(--gray-hue));
1094
+ --gray-3: oklch(from var(--color-3) l var(--gray-chroma) var(--gray-hue));
1095
+ --gray-4: oklch(from var(--color-4) l var(--gray-chroma) var(--gray-hue));
1096
+ --gray-5: oklch(from var(--color-5) l var(--gray-chroma) var(--gray-hue));
1097
+ --gray-6: oklch(from var(--color-6) l var(--gray-chroma) var(--gray-hue));
1098
+ --gray-7: oklch(from var(--color-7) l var(--gray-chroma) var(--gray-hue));
1099
+ --gray-8: oklch(from var(--color-8) l var(--gray-chroma) var(--gray-hue));
1100
+ --gray-9: oklch(from var(--color-9) l var(--gray-chroma) var(--gray-hue));
1101
+ --gray-10: oklch(from var(--color-10) l var(--gray-chroma) var(--gray-hue));
1102
+ --gray-11: oklch(from var(--color-11) l var(--gray-chroma) var(--gray-hue));
1103
+ --gray-12: oklch(from var(--color-12) l var(--gray-chroma) var(--gray-hue));
1104
+ --gray-13: oklch(from var(--color-13) l var(--gray-chroma) var(--gray-hue));
1105
+ --gray-14: oklch(from var(--color-14) l var(--gray-chroma) var(--gray-hue));
1106
+ --gray-15: oklch(from var(--color-15) l var(--gray-chroma) var(--gray-hue));
1107
+ --gray-16: oklch(from var(--color-16) l var(--gray-chroma) var(--gray-hue));
1108
+ }
1058
1109
  }
1110
+
1111
+ /*
1112
+ theme three theme setup
1113
+ */
1114
+
1115
+ @layer theme {
1116
+ /* 1. Color scheme */
1117
+ .ui-light {
1118
+ --color-scheme: light;
1119
+ }
1120
+
1121
+ .ui-dark {
1122
+ --color-scheme: dark;
1123
+ }
1124
+
1125
+ :where(html) {
1126
+ color-scheme: var(--color-scheme, light dark);
1127
+
1128
+ /* 2. Palette source - one value to rule them all. Every other color is derived from this one.
1129
+ Both light/dark branches are wired up via light-dark() so prefers-color-scheme works
1130
+ automatically. Set them to different OKLCH values if you want a distinct dark-mode palette. */
1131
+ --palette-source: light-dark(
1132
+ oklch(0.58 calc(0.21 * 0.5) var(--hue-blue)),
1133
+ oklch(0.58 calc(0.21 * 0.5) var(--hue-blue))
1134
+ );
1135
+ --palette-hue-rotate-by: 0;
1136
+
1137
+ /* Gray ramp lives in core/palette.css. Override --gray-chroma or
1138
+ --gray-hue here if this theme wants warmer/cooler grays. */
1139
+
1140
+ /* 3. Named colors (no severity meaning) — use when you literally want a green/red/etc. dot */
1141
+ --blue: oklch(from var(--color-9) l 0.2 210);
1142
+ --green: oklch(from var(--color-9) l 0.2 145);
1143
+ --orange: oklch(from var(--color-7) l 0.2 75);
1144
+ --red: oklch(from var(--color-9) l 0.2 25);
1145
+
1146
+ /* 4. Intent tokens
1147
+ Severity (have scope classes below): --success, --info, --warning, --critical
1148
+ Non-severity (value-only): --primary, --neutral */
1149
+ --success: var(--green);
1150
+ --info: var(--blue);
1151
+ --warning: var(--orange);
1152
+ --critical: var(--red);
1153
+ --neutral: var(--gray-9);
1154
+
1155
+ /* 5. Primary */
1156
+ --primary: var(--color-8);
1157
+ --primary-light: oklch(from var(--primary) calc(l * 1.25) c h);
1158
+ --primary-dark: oklch(from var(--primary) calc(l * 0.75) c h);
1159
+ --primary-contrast: var(--gray-1);
1160
+
1161
+ /* 6. Text */
1162
+ --text-primary: light-dark(var(--gray-15), var(--gray-1));
1163
+ --text-primary-contrast: light-dark(var(--gray-2), var(--gray-15));
1164
+ --text-muted: light-dark(var(--gray-13), var(--gray-4));
1165
+ --text-muted-contrast: light-dark(var(--gray-4), var(--gray-13));
1166
+
1167
+ /* 7. Surfaces */
1168
+ --surface-default: light-dark(var(--gray-1), var(--gray-13));
1169
+ --surface-filled: light-dark(var(--gray-4), var(--gray-15));
1170
+ --surface-tonal: light-dark(var(--gray-3), var(--gray-12));
1171
+ --surface-elevated: light-dark(var(--gray-1), var(--gray-12));
1172
+
1173
+ /* 8. Borders */
1174
+ --border-color: light-dark(var(--gray-4), var(--gray-12));
1175
+ --border-radius: var(--size-2);
1176
+ --border-width: 1px;
1177
+
1178
+ /* 9. Focus ring — components consume these and may override locally
1179
+ (e.g. .ui-button.ui-filled { --focus-ring-offset: 3px; }, .ui-checkbox { --focus-ring-offset: 0; }) */
1180
+ --focus-ring-color: var(--primary);
1181
+ --focus-ring-width: 2px;
1182
+ --focus-ring-offset: 2px;
1183
+ --focus-ring-style: solid;
1184
+
1185
+ /* 10. Typography */
1186
+ --font-size-h1: var(--font-size-fluid-3);
1187
+ --font-size-h2: var(--font-size-fluid-2);
1188
+ --font-size-h3: var(--font-size-fluid-1);
1189
+ --font-size-h4: var(--font-size-3);
1190
+ --font-size-h5: var(--font-size-2);
1191
+ --font-size-h6: var(--font-size-fluid-0);
1192
+
1193
+ /* Sneaking in an extra font size I want but Open Props doesn't provide. You can do whatever you want with your own theme. It's just CSS. */
1194
+ --font-size-05: 0.875rem;
1195
+
1196
+ /* 11. Control sizes — shared scale for fields and buttons so they line up
1197
+ visually. --field-size-* and --button-size-* alias from --control-size-*. */
1198
+ --control-size-x-small: 28px;
1199
+ --control-size-small: 32px;
1200
+ --control-size: 40px;
1201
+ --control-size-large: 46px;
1202
+
1203
+ --field-size-x-small: var(--control-size-x-small);
1204
+ --field-size-small: var(--control-size-small);
1205
+ --field-size: var(--control-size);
1206
+ --field-size-large: var(--control-size-large);
1207
+
1208
+ --button-size-x-small: var(--control-size-x-small);
1209
+ --button-size-small: var(--control-size-small);
1210
+ --button-size: var(--control-size);
1211
+ --button-size-large: var(--control-size-large);
1212
+
1213
+ /* 12. Field / input */
1214
+ --field-border-color: var(--border-color);
1215
+ --field-border-radius: var(--size-2);
1216
+ --field-border-width: 1px;
1217
+
1218
+ /* 13. Button */
1219
+ --button-border-radius: var(--size-2);
1220
+ }
1221
+
1222
+ /* 14. Severity scope classes — re-source the palette inside these contexts.
1223
+ Authoring `<div class="ui-warning">` paints the entire subtree warning-orange.
1224
+ Non-severity tokens (--primary, --neutral) deliberately have no scope class. */
1225
+ :where(.ui-critical, [data-invalid], del) {
1226
+ --palette-source: oklch(0.58 0.21 var(--hue-red));
1227
+ --palette-hue-rotate-by: 1;
1228
+ }
1229
+
1230
+ :where(.ui-info, abbr, dfn) {
1231
+ --palette-source: oklch(0.58 0.21 var(--hue-blue));
1232
+ --palette-hue-rotate-by: 1;
1233
+ }
1234
+
1235
+ :where(.ui-success, ins) {
1236
+ --palette-source: oklch(0.58 0.21 var(--hue-green));
1237
+ --palette-hue-rotate-by: 1;
1238
+ }
1239
+
1240
+ :where(.ui-warning) {
1241
+ --palette-source: oklch(0.58 0.21 var(--hue-orange));
1242
+ --palette-hue-rotate-by: 1;
1243
+ }
1059
1244
  }
1060
1245
 
1061
1246
  /* Normalize */
1062
1247
 
1063
1248
  @layer normalize {
1064
-
1065
1249
  *,
1066
1250
  ::before,
1067
1251
  ::after {
@@ -1120,7 +1304,6 @@
1120
1304
  outline: none !important;
1121
1305
  }
1122
1306
 
1123
-
1124
1307
  :where(:not(fieldset, progress, meter)) {
1125
1308
  background-origin: border-box;
1126
1309
  background-repeat: no-repeat;
@@ -1176,7 +1359,9 @@
1176
1359
 
1177
1360
  :focus-visible {
1178
1361
  /* Inverts the --_page-bg-color */
1179
- --_focus-visible-color: rgb(from var(--_page-bg-color) calc(255 - r) calc(255 - g) calc(255 - b));
1362
+ --_focus-visible-color: rgb(
1363
+ from var(--_page-bg-color) calc(255 - r) calc(255 - g) calc(255 - b)
1364
+ );
1180
1365
 
1181
1366
  border-radius: var(--border-radius, 0px);
1182
1367
  outline: 2px solid var(--_focus-visible-color);
@@ -1185,7 +1370,7 @@
1185
1370
 
1186
1371
  @media (prefers-reduced-motion: no-preference) {
1187
1372
  :where(:focus-visible) {
1188
- transition: outline-offset .15 var(--ease-2);
1373
+ transition: outline-offset 0.15 var(--ease-2);
1189
1374
  }
1190
1375
 
1191
1376
  :where(:not(:active):focus-visible) {
@@ -1197,23 +1382,28 @@
1197
1382
  outline-offset: var(--outline-offset, 0px);
1198
1383
  }
1199
1384
 
1200
- :where(a[href],
1385
+ :where(
1386
+ a[href],
1201
1387
  area,
1202
1388
  button,
1203
- input:not([type="text"],
1389
+ input:not(
1390
+ [type="text"],
1204
1391
  [type="email"],
1205
1392
  [type="number"],
1206
1393
  [type="password"],
1207
1394
  [type=""],
1208
1395
  [type="tel"],
1209
- [type="url"]),
1396
+ [type="url"]
1397
+ ),
1210
1398
  label[for],
1211
1399
  select,
1212
- summary) {
1400
+ summary
1401
+ ) {
1213
1402
  cursor: pointer;
1214
1403
  }
1215
1404
 
1216
- :where(a[href],
1405
+ :where(
1406
+ a[href],
1217
1407
  area,
1218
1408
  button,
1219
1409
  [role="button"],
@@ -1222,7 +1412,8 @@
1222
1412
  select,
1223
1413
  summary,
1224
1414
  textarea,
1225
- [tabindex]:not([tabindex*="-"])) {
1415
+ [tabindex]:not([tabindex*="-"])
1416
+ ) {
1226
1417
  -webkit-tap-highlight-color: transparent;
1227
1418
  touch-action: manipulation;
1228
1419
  }
@@ -1255,214 +1446,89 @@
1255
1446
  }
1256
1447
  }
1257
1448
 
1258
- /* Theme */
1449
+ /* Components */
1259
1450
 
1260
1451
  /*
1261
- theme three theme setup
1452
+ * Components are divided into two categories - if they are stand-alone (root) or if they are built on top of others (extended).
1262
1453
  */
1263
1454
 
1264
- @layer theme {
1455
+ /*** Root components (no dependencies) */
1265
1456
 
1266
- /* 1. Color scheme */
1267
- .ui-light {
1268
- --color-scheme: light;
1269
- }
1457
+ @layer components.root {
1458
+ :where(.ui-button) {
1459
+ --_color: light-dark(var(--color-16), var(--color-1));
1460
+ --_color-contrast: light-dark(var(--color-1), var(--color-16));
1461
+ --_color-tonal: var(--surface-tonal);
1270
1462
 
1271
- .ui-dark {
1272
- --color-scheme: dark;
1273
- }
1463
+ --_accent: var(--_color);
1464
+ --_accent-contrast: var(--_color-contrast);
1465
+ --_accent-tonal: var(--_color-tonal);
1466
+ --_accent-tonal-contrast: var(--_color);
1274
1467
 
1275
- :where(html) {
1276
- color-scheme: var(--color-scheme, light dark);
1468
+ --_default-hover-bg-color: light-dark(
1469
+ oklch(from var(--_accent) l 0.01 h / 10%),
1470
+ oklch(from var(--_accent) l 0.01 h / 20%)
1471
+ );
1472
+ --_default-active-bg-color: light-dark(
1473
+ oklch(from var(--_accent) l 0.06 h / 20%),
1474
+ oklch(from var(--_accent) l 0.06 h / 30%)
1475
+ );
1277
1476
 
1278
- /* 2. Palette source - one value to rule them all. Every other color is derived from this one.
1279
- Both light/dark branches are wired up via light-dark() so prefers-color-scheme works
1280
- automatically. Set them to different OKLCH values if you want a distinct dark-mode palette. */
1281
- --palette-source: light-dark(oklch(0.58 calc(0.21 * 0.5) var(--hue-blue)),
1282
- oklch(0.58 calc(0.21 * 0.5) var(--hue-blue)));
1283
- --palette-hue-rotate-by: 0;
1477
+ --_filled-hover-bg-color: light-dark(
1478
+ oklch(from var(--_accent) calc(l + 0.2) c h),
1479
+ oklch(from var(--_accent) calc(l - 0.1) c h)
1480
+ );
1481
+ --_filled-active-bg-color: light-dark(
1482
+ oklch(from var(--_accent) calc(l + 0.3) c h),
1483
+ oklch(from var(--_accent) calc(l - 0.15) c h)
1484
+ );
1485
+ --_outlined-active-bg-color: var(--_filled-active-bg-color);
1284
1486
 
1285
- /* Gray ramp lives in core/palette.css. Override --gray-chroma or
1286
- --gray-hue here if this theme wants warmer/cooler grays. */
1487
+ --_bg-color: transparent;
1488
+ --_border-color: transparent;
1489
+ --_border-width: var(--border-size-1);
1490
+ --_font-size: var(--font-size-1);
1491
+ --_min-height: var(--button-size);
1492
+ --_border-radius: var(--button-border-radius, var(--radius-2));
1493
+ --_text-color: var(--_accent);
1287
1494
 
1288
- /* 3. Named colors (no severity meaning) — use when you literally want a green/red/etc. dot */
1289
- --blue: oklch(from var(--color-9) l 0.2 210);
1290
- --green: oklch(from var(--color-9) l 0.2 145);
1291
- --orange: oklch(from var(--color-7) l 0.2 75);
1292
- --red: oklch(from var(--color-9) l 0.2 25);
1495
+ -webkit-tap-highlight-color: transparent;
1496
+ -webkit-touch-callout: none;
1497
+ align-items: center;
1498
+ background-color: var(--_bg-color);
1499
+ border: var(--_border-width) solid var(--_border-color);
1500
+ border-radius: var(--_border-radius);
1501
+ color: var(--_text-color);
1502
+ display: inline-flex;
1503
+ font-size: var(--_font-size);
1504
+ font-weight: 700;
1505
+ gap: var(--size-2);
1506
+ justify-content: center;
1507
+ min-block-size: var(--_min-height);
1508
+ padding-block: 0.5ex;
1509
+ padding-inline: 1.5ex;
1510
+ text-align: center;
1511
+ text-decoration: none;
1512
+ transition:
1513
+ background-color 0.1s ease,
1514
+ color 0.1s ease,
1515
+ border-color 0.1s ease,
1516
+ box-shadow 0.1s ease;
1517
+ user-select: none;
1293
1518
 
1294
- /* 4. Intent tokens
1295
- Severity (have scope classes below): --success, --info, --warning, --critical
1296
- Non-severity (value-only): --primary, --neutral */
1297
- --success: var(--green);
1298
- --info: var(--blue);
1299
- --warning: var(--orange);
1300
- --critical: var(--red);
1301
- --neutral: var(--gray-9);
1519
+ /* Colors — shared interaction model for critical and primary.
1520
+ Each color modifier below only swaps --_color; the tonal surface,
1521
+ contrast text, and hover/active strategy are identical.
1522
+ The .critical scope class in theme.css redirects --palette-source so
1523
+ --color-6 below becomes a tint of the active color. */
1524
+ &.ui-critical,
1525
+ &.ui-primary {
1526
+ --_color-contrast: var(--gray-1);
1527
+ --_color-tonal: var(--color-6);
1528
+ --_accent-tonal-contrast: var(--text-primary-contrast);
1302
1529
 
1303
- /* 5. Primary */
1304
- --primary: var(--color-8);
1305
- --primary-light: oklch(from var(--primary) calc(l * 1.25) c h);
1306
- --primary-dark: oklch(from var(--primary) calc(l * 0.75) c h);
1307
- --primary-contrast: var(--gray-1);
1308
-
1309
- /* 6. Text */
1310
- --text-primary: light-dark(var(--gray-15), var(--gray-1));
1311
- --text-primary-contrast: light-dark(var(--gray-2), var(--gray-15));
1312
- --text-muted: light-dark(var(--gray-13), var(--gray-4));
1313
- --text-muted-contrast: light-dark(var(--gray-4), var(--gray-13));
1314
-
1315
- /* 7. Surfaces */
1316
- --surface-default: light-dark(var(--gray-1), var(--gray-13));
1317
- --surface-filled: light-dark(var(--gray-4), var(--gray-15));
1318
- --surface-tonal: light-dark(var(--gray-3), var(--gray-12));
1319
- --surface-elevated: light-dark(var(--gray-1), var(--gray-12));
1320
-
1321
- /* 8. Borders */
1322
- --border-color: light-dark(var(--gray-4), var(--gray-12));
1323
- --border-radius: var(--size-2);
1324
- --border-width: 1px;
1325
-
1326
- /* 9. Focus ring — components consume these and may override locally
1327
- (e.g. .ui-button.ui-filled { --focus-ring-offset: 3px; }, .ui-checkbox { --focus-ring-offset: 0; }) */
1328
- --focus-ring-color: var(--primary);
1329
- --focus-ring-width: 2px;
1330
- --focus-ring-offset: 2px;
1331
- --focus-ring-style: solid;
1332
-
1333
- /* 10. Typography */
1334
- --font-size-h1: var(--font-size-fluid-3);
1335
- --font-size-h2: var(--font-size-fluid-2);
1336
- --font-size-h3: var(--font-size-fluid-1);
1337
- --font-size-h4: var(--font-size-3);
1338
- --font-size-h5: var(--font-size-2);
1339
- --font-size-h6: var(--font-size-fluid-0);
1340
-
1341
- /* Sneaking in an extra font size I want but Open Props doesn't provide. You can do whatever you want with your own theme. It's just CSS. */
1342
- --font-size-05: 0.875rem;
1343
-
1344
- /* 11. Control sizes — shared scale for fields and buttons so they line up
1345
- visually. --field-size-* and --button-size-* alias from --control-size-*. */
1346
- --control-size-x-small: 28px;
1347
- --control-size-small: 32px;
1348
- --control-size: 40px;
1349
- --control-size-large: 46px;
1350
-
1351
- --field-size-x-small: var(--control-size-x-small);
1352
- --field-size-small: var(--control-size-small);
1353
- --field-size: var(--control-size);
1354
- --field-size-large: var(--control-size-large);
1355
-
1356
- --button-size-x-small: var(--control-size-x-small);
1357
- --button-size-small: var(--control-size-small);
1358
- --button-size: var(--control-size);
1359
- --button-size-large: var(--control-size-large);
1360
-
1361
- /* 12. Field / input */
1362
- --field-border-color: var(--border-color);
1363
- --field-border-radius: var(--size-2);
1364
- --field-border-width: 1px;
1365
-
1366
- /* 13. Button */
1367
- --button-border-radius: var(--size-2);
1368
- }
1369
-
1370
- /* 14. Severity scope classes — re-source the palette inside these contexts.
1371
- Authoring `<div class="ui-warning">` paints the entire subtree warning-orange.
1372
- Non-severity tokens (--primary, --neutral) deliberately have no scope class. */
1373
- :where(.ui-critical, [data-invalid], del) {
1374
- --palette-source: oklch(0.58 0.21 var(--hue-red));
1375
- --palette-hue-rotate-by: 1;
1376
- }
1377
-
1378
- :where(.ui-info, abbr, dfn) {
1379
- --palette-source: oklch(0.58 0.21 var(--hue-blue));
1380
- --palette-hue-rotate-by: 1;
1381
- }
1382
-
1383
- :where(.ui-success, ins) {
1384
- --palette-source: oklch(0.58 0.21 var(--hue-green));
1385
- --palette-hue-rotate-by: 1;
1386
- }
1387
-
1388
- :where(.ui-warning) {
1389
- --palette-source: oklch(0.58 0.21 var(--hue-orange));
1390
- --palette-hue-rotate-by: 1;
1391
- }
1392
- }
1393
-
1394
- /* Components */
1395
-
1396
- /*
1397
- * Components are divided into two categories - if they are stand-alone (root) or if they are built on top of others (extended).
1398
- */
1399
-
1400
- /*** Root components (no dependencies) */
1401
-
1402
- @layer components.root {
1403
- :where(.ui-button) {
1404
- --_color: light-dark(var(--color-16), var(--color-1));
1405
- --_color-contrast: light-dark(var(--color-1), var(--color-16));
1406
- --_color-tonal: var(--surface-tonal);
1407
-
1408
- --_accent: var(--_color);
1409
- --_accent-contrast: var(--_color-contrast);
1410
- --_accent-tonal: var(--_color-tonal);
1411
- --_accent-tonal-contrast: var(--_color);
1412
-
1413
- --_default-hover-bg-color: light-dark(oklch(from var(--_accent) l 0.01 h / 10%),
1414
- oklch(from var(--_accent) l 0.01 h / 20%));
1415
- --_default-active-bg-color: light-dark(oklch(from var(--_accent) l 0.06 h / 20%),
1416
- oklch(from var(--_accent) l 0.06 h / 30%));
1417
-
1418
- --_filled-hover-bg-color: light-dark(oklch(from var(--_accent) calc(l + 0.2) c h),
1419
- oklch(from var(--_accent) calc(l - 0.1) c h));
1420
- --_filled-active-bg-color: light-dark(oklch(from var(--_accent) calc(l + 0.3) c h),
1421
- oklch(from var(--_accent) calc(l - 0.15) c h));
1422
- --_outlined-active-bg-color: var(--_filled-active-bg-color);
1423
-
1424
- --_bg-color: transparent;
1425
- --_border-color: transparent;
1426
- --_border-width: var(--border-size-1);
1427
- --_font-size: var(--font-size-1);
1428
- --_min-height: var(--button-size);
1429
- --_border-radius: var(--button-border-radius, var(--radius-2));
1430
- --_text-color: var(--_accent);
1431
-
1432
- -webkit-tap-highlight-color: transparent;
1433
- -webkit-touch-callout: none;
1434
- align-items: center;
1435
- background-color: var(--_bg-color);
1436
- border: var(--_border-width) solid var(--_border-color);
1437
- border-radius: var(--_border-radius);
1438
- color: var(--_text-color);
1439
- display: inline-flex;
1440
- font-size: var(--_font-size);
1441
- font-weight: 700;
1442
- gap: var(--size-2);
1443
- justify-content: center;
1444
- min-block-size: var(--_min-height);
1445
- padding-block: 0.5ex;
1446
- padding-inline: 1.5ex;
1447
- text-align: center;
1448
- text-decoration: none;
1449
- transition: background-color .1s ease, color .1s ease,
1450
- border-color .1s ease, box-shadow .1s ease;
1451
- user-select: none;
1452
-
1453
- /* Colors — shared interaction model for critical and primary.
1454
- Each color modifier below only swaps --_color; the tonal surface,
1455
- contrast text, and hover/active strategy are identical.
1456
- The .critical scope class in theme.css redirects --palette-source so
1457
- --color-6 below becomes a tint of the active color. */
1458
- &.ui-critical,
1459
- &.ui-primary {
1460
- --_color-contrast: var(--gray-1);
1461
- --_color-tonal: var(--color-6);
1462
- --_accent-tonal-contrast: var(--text-primary-contrast);
1463
-
1464
- --_default-hover-bg-color: oklch(from var(--_accent) l c h / 15%);
1465
- --_default-active-bg-color: oklch(from var(--_accent) l c h / 25%);
1530
+ --_default-hover-bg-color: oklch(from var(--_accent) l c h / 15%);
1531
+ --_default-active-bg-color: oklch(from var(--_accent) l c h / 25%);
1466
1532
 
1467
1533
  --_filled-hover-bg-color: oklch(from var(--_accent) calc(l - 0.1) c h);
1468
1534
  --_filled-active-bg-color: oklch(from var(--_accent) calc(l - 0.15) c h);
@@ -1480,9 +1546,11 @@
1480
1546
 
1481
1547
  /* Disabled */
1482
1548
  &:where([disabled]) {
1483
- --_text-color: color-mix(in oklch,
1484
- var(--text-muted) 50%,
1485
- var(--surface-default));
1549
+ --_text-color: color-mix(
1550
+ in oklch,
1551
+ var(--text-muted) 50%,
1552
+ var(--surface-default)
1553
+ );
1486
1554
 
1487
1555
  cursor: not-allowed;
1488
1556
  opacity: 0.64;
@@ -1500,7 +1568,6 @@
1500
1568
  }
1501
1569
  }
1502
1570
 
1503
-
1504
1571
  /* Icons / Keyboard */
1505
1572
  &:where(:has(svg), &.ui-icon-only) {
1506
1573
  gap: 1ex;
@@ -1527,14 +1594,14 @@
1527
1594
  --_min-height: var(--button-size-x-small);
1528
1595
  --_font-size: var(--font-size-0);
1529
1596
  padding-block: 0;
1530
- padding-inline: .5ex;
1597
+ padding-inline: 0.5ex;
1531
1598
  }
1532
1599
 
1533
1600
  &.ui-small {
1534
1601
  --_min-height: var(--button-size-small);
1535
1602
  --_font-size: var(--font-size-05);
1536
1603
  padding-block: 0;
1537
- padding-inline: .75ex;
1604
+ padding-inline: 0.75ex;
1538
1605
  }
1539
1606
 
1540
1607
  &.ui-large {
@@ -1616,113 +1683,116 @@
1616
1683
  }
1617
1684
 
1618
1685
  @layer components.root {
1619
- :where(.ui-callout) {
1620
- --_bg-color: var(--surface-tonal);
1621
- --_border-color: var(--surface-tonal);
1622
- --_color: var(--text-primary);
1623
- --_icon-color: currentColor;
1624
- --_link-hover-color: var(--primary);
1625
- --_padding: var(--size-3);
1626
- --_border-radius: var(--border-radius);
1627
- --_gap: var(--size-3);
1628
- --_content-gap: var(--size-2);
1629
- --_font-size: var(--font-size-05);
1630
- --_title-font-size: var(--font-size-1);
1631
- --_icon-size: var(--size-4);
1632
- --_surface-bg: var(--surface-default);
1633
-
1634
- --_outlined-bg-color: var(--surface-default);
1635
- --_outlined-border-color: var(--border-color);
1636
- --_outlined-color: var(--text-primary);
1637
- --_outlined-icon-color: currentColor;
1638
-
1639
- background-color: var(--_bg-color, var(--_surface-bg));
1640
- border: 1px solid var(--_border-color, var(--border-color));
1641
- border-radius: var(--_border-radius);
1642
- color: var(--_color);
1643
- isolation: isolate;
1644
- padding: var(--_padding);
1645
- position: relative;
1646
-
1647
- &.ui-critical,
1648
- &.ui-info,
1649
- &.ui-neutral,
1650
- &.ui-success,
1651
- &.ui-warning {
1652
- --_bg-color: light-dark(oklch(from var(--color-2) l c h / 20%), oklch(from var(--color-6) l c h / 5%));
1653
- --_border-color: light-dark(var(--color-5), var(--color-11));
1654
- --_color: light-dark(var(--color-16), var(--color-1));
1655
- --_icon-color: var(--color-9);
1656
-
1657
- --_outlined-bg-color: var(--surface-default);
1658
- --_outlined-border-color: var(--color-9);
1659
- --_outlined-color: light-dark(var(--color-15), var(--color-1));
1660
- --_outlined-icon-color: var(--color-9);
1661
- }
1662
-
1663
- &.ui-outlined {
1664
- --_bg-color: var(--_outlined-bg-color);
1665
- --_border-color: var(--_outlined-border-color);
1666
- --_color: var(--_outlined-color);
1667
- --_icon-color: var(--_outlined-icon-color);
1668
- }
1669
-
1670
- &::before {
1671
- background-color: var(--_bg-color);
1672
- border-radius: inherit;
1673
- content: "";
1674
- inset: 0;
1675
- pointer-events: none;
1676
- position: absolute;
1677
- z-index: -1;
1678
- }
1679
-
1680
- &>.ui-content {
1681
- display: grid;
1682
- font-size: var(--_font-size);
1683
- gap: var(--_content-gap);
1684
-
1685
- h1,
1686
- h2,
1687
- h3,
1688
- h4,
1689
- h5,
1690
- h6 {
1691
- color: inherit;
1692
- font-size: var(--_title-font-size);
1693
- font-weight: 600;
1694
-
1695
- * {
1696
- font-size: inherit;
1697
- }
1698
- }
1699
- }
1700
-
1701
- /* Links
1686
+ :where(.ui-callout) {
1687
+ --_bg-color: var(--surface-tonal);
1688
+ --_border-color: var(--surface-tonal);
1689
+ --_color: var(--text-primary);
1690
+ --_icon-color: currentColor;
1691
+ --_link-hover-color: var(--primary);
1692
+ --_padding: var(--size-3);
1693
+ --_border-radius: var(--border-radius);
1694
+ --_gap: var(--size-3);
1695
+ --_content-gap: var(--size-2);
1696
+ --_font-size: var(--font-size-05);
1697
+ --_title-font-size: var(--font-size-1);
1698
+ --_icon-size: var(--size-4);
1699
+ --_surface-bg: var(--surface-default);
1700
+
1701
+ --_outlined-bg-color: var(--surface-default);
1702
+ --_outlined-border-color: var(--border-color);
1703
+ --_outlined-color: var(--text-primary);
1704
+ --_outlined-icon-color: currentColor;
1705
+
1706
+ background-color: var(--_bg-color, var(--_surface-bg));
1707
+ border: 1px solid var(--_border-color, var(--border-color));
1708
+ border-radius: var(--_border-radius);
1709
+ color: var(--_color);
1710
+ isolation: isolate;
1711
+ padding: var(--_padding);
1712
+ position: relative;
1713
+
1714
+ &.ui-critical,
1715
+ &.ui-info,
1716
+ &.ui-neutral,
1717
+ &.ui-success,
1718
+ &.ui-warning {
1719
+ --_bg-color: light-dark(
1720
+ oklch(from var(--color-2) l c h / 20%),
1721
+ oklch(from var(--color-6) l c h / 5%)
1722
+ );
1723
+ --_border-color: light-dark(var(--color-5), var(--color-11));
1724
+ --_color: light-dark(var(--color-16), var(--color-1));
1725
+ --_icon-color: var(--color-9);
1726
+
1727
+ --_outlined-bg-color: var(--surface-default);
1728
+ --_outlined-border-color: var(--color-9);
1729
+ --_outlined-color: light-dark(var(--color-15), var(--color-1));
1730
+ --_outlined-icon-color: var(--color-9);
1731
+ }
1732
+
1733
+ &.ui-outlined {
1734
+ --_bg-color: var(--_outlined-bg-color);
1735
+ --_border-color: var(--_outlined-border-color);
1736
+ --_color: var(--_outlined-color);
1737
+ --_icon-color: var(--_outlined-icon-color);
1738
+ }
1739
+
1740
+ &::before {
1741
+ background-color: var(--_bg-color);
1742
+ border-radius: inherit;
1743
+ content: "";
1744
+ inset: 0;
1745
+ pointer-events: none;
1746
+ position: absolute;
1747
+ z-index: -1;
1748
+ }
1749
+
1750
+ & > .ui-content {
1751
+ display: grid;
1752
+ font-size: var(--_font-size);
1753
+ gap: var(--_content-gap);
1754
+
1755
+ h1,
1756
+ h2,
1757
+ h3,
1758
+ h4,
1759
+ h5,
1760
+ h6 {
1761
+ color: inherit;
1762
+ font-size: var(--_title-font-size);
1763
+ font-weight: 600;
1764
+
1765
+ * {
1766
+ font-size: inherit;
1767
+ }
1768
+ }
1769
+ }
1770
+
1771
+ /* Links
1702
1772
  * Can't make sure contrast will be acceptable (yet) so we use the current text color instead.
1703
1773
  */
1704
- &:not(.ui-outlined) {
1705
- a[href] {
1706
- color: inherit;
1707
-
1708
- &:hover {
1709
- color: var(--_link-hover-color);
1710
- }
1711
- }
1712
- }
1713
-
1714
- /* Icon */
1715
- &:has(svg) {
1716
- display: grid;
1717
- gap: var(--_gap);
1718
- grid-template-columns: var(--_icon-size) 1fr;
1719
-
1720
- svg {
1721
- margin-block-start: 0.15rem;
1722
- stroke: var(--_icon-color);
1723
- }
1724
- }
1725
- }
1774
+ &:not(.ui-outlined) {
1775
+ a[href] {
1776
+ color: inherit;
1777
+
1778
+ &:hover {
1779
+ color: var(--_link-hover-color);
1780
+ }
1781
+ }
1782
+ }
1783
+
1784
+ /* Icon */
1785
+ &:has(svg) {
1786
+ display: grid;
1787
+ gap: var(--_gap);
1788
+ grid-template-columns: var(--_icon-size) 1fr;
1789
+
1790
+ svg {
1791
+ margin-block-start: 0.15rem;
1792
+ stroke: var(--_icon-color);
1793
+ }
1794
+ }
1795
+ }
1726
1796
  }
1727
1797
 
1728
1798
  @layer components.root {
@@ -1735,14 +1805,22 @@
1735
1805
  --_accent-contrast: var(--_color-contrast);
1736
1806
  --_accent-tonal: var(--_color-tonal);
1737
1807
  --_accent-tonal-contrast: var(--_color);
1738
- --_default-hover-bg-color: light-dark(oklch(from var(--_accent) l 0.01 h / 10%),
1739
- oklch(from var(--_accent) l 0.01 h / 20%));
1740
- --_default-active-bg-color: light-dark(oklch(from var(--_accent) l 0.06 h / 20%),
1741
- oklch(from var(--_accent) l 0.06 h / 30%));
1742
- --_filled-hover-bg-color: light-dark(oklch(from var(--_accent) calc(l + 0.2) c h),
1743
- oklch(from var(--_accent) calc(l - 0.1) c h));
1744
- --_filled-active-bg-color: light-dark(oklch(from var(--_accent) calc(l + 0.3) c h),
1745
- oklch(from var(--_accent) calc(l - 0.15) c h));
1808
+ --_default-hover-bg-color: light-dark(
1809
+ oklch(from var(--_accent) l 0.01 h / 10%),
1810
+ oklch(from var(--_accent) l 0.01 h / 20%)
1811
+ );
1812
+ --_default-active-bg-color: light-dark(
1813
+ oklch(from var(--_accent) l 0.06 h / 20%),
1814
+ oklch(from var(--_accent) l 0.06 h / 30%)
1815
+ );
1816
+ --_filled-hover-bg-color: light-dark(
1817
+ oklch(from var(--_accent) calc(l + 0.2) c h),
1818
+ oklch(from var(--_accent) calc(l - 0.1) c h)
1819
+ );
1820
+ --_filled-active-bg-color: light-dark(
1821
+ oklch(from var(--_accent) calc(l + 0.3) c h),
1822
+ oklch(from var(--_accent) calc(l - 0.15) c h)
1823
+ );
1746
1824
  --_outlined-active-bg-color: var(--_filled-active-bg-color);
1747
1825
 
1748
1826
  --_bg-color: transparent;
@@ -1762,8 +1840,11 @@
1762
1840
  justify-content: center;
1763
1841
  padding: 0;
1764
1842
  transform-style: preserve-3d;
1765
- transition: background-color .1s ease, color .1s ease,
1766
- border-color .1s ease, box-shadow .1s ease;
1843
+ transition:
1844
+ background-color 0.1s ease,
1845
+ color 0.1s ease,
1846
+ border-color 0.1s ease,
1847
+ box-shadow 0.1s ease;
1767
1848
 
1768
1849
  &:where([disabled]) {
1769
1850
  --_text-color: light-dark(rgb(0, 0, 0/0.3), rgb(255, 255, 255/0.26));
@@ -1785,7 +1866,9 @@
1785
1866
  background-color: transparent;
1786
1867
 
1787
1868
  @media (prefers-reduced-motion: no-preference) {
1788
- transition: transform 0.2s ease, background-color .1s ease;
1869
+ transition:
1870
+ transform 0.2s ease,
1871
+ background-color 0.1s ease;
1789
1872
  }
1790
1873
  }
1791
1874
 
@@ -1821,14 +1904,20 @@
1821
1904
  &:where(:not([disabled])) {
1822
1905
  &:where(:not(:active):hover) {
1823
1906
  &::before {
1824
- background-color: var(--_interaction-hover-color, var(--_default-hover-bg-color));
1907
+ background-color: var(
1908
+ --_interaction-hover-color,
1909
+ var(--_default-hover-bg-color)
1910
+ );
1825
1911
  }
1826
1912
  }
1827
1913
 
1828
1914
  &:where(:hover:active),
1829
1915
  &[aria-current="page"] {
1830
1916
  &::before {
1831
- background-color: var(--_interaction-active-color, var(--_default-active-bg-color));
1917
+ background-color: var(
1918
+ --_interaction-active-color,
1919
+ var(--_default-active-bg-color)
1920
+ );
1832
1921
  }
1833
1922
  }
1834
1923
  }
@@ -1876,7 +1965,7 @@
1876
1965
  gap: 0 var(--size-1);
1877
1966
  position: relative;
1878
1967
 
1879
- &>.ui-tab-input[type="radio"] {
1968
+ & > .ui-tab-input[type="radio"] {
1880
1969
  /* utils > .ui-sr-only */
1881
1970
  /* TODO: use mixin for this when available */
1882
1971
  block-size: 1px;
@@ -1887,36 +1976,35 @@
1887
1976
  white-space: nowrap;
1888
1977
 
1889
1978
  &:checked {
1890
-
1891
1979
  /* Checked Tab */
1892
- &+[role="tab"],
1893
- &+.ui-tab-label {
1980
+ & + [role="tab"],
1981
+ & + .ui-tab-label {
1894
1982
  border-block-end-color: var(--_accent-color);
1895
1983
  color: var(--_accent-color);
1896
1984
 
1897
1985
  /* Checked Panel */
1898
- &+[role="tabpanel"],
1899
- &+.ui-tab-panel {
1986
+ & + [role="tabpanel"],
1987
+ & + .ui-tab-panel {
1900
1988
  display: block;
1901
1989
  }
1902
1990
  }
1903
1991
  }
1904
1992
 
1905
1993
  &:focus-visible {
1906
-
1907
- &+[role="tab"],
1908
- &+.ui-tab-label {
1994
+ & + [role="tab"],
1995
+ & + .ui-tab-label {
1909
1996
  --focus-ring-color: var(--text-muted);
1910
1997
  --focus-ring-offset: calc(-1 * var(--size-2));
1911
- outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
1998
+ outline: var(--focus-ring-width) var(--focus-ring-style)
1999
+ var(--focus-ring-color);
1912
2000
  outline-offset: var(--focus-ring-offset);
1913
2001
  }
1914
2002
  }
1915
2003
  }
1916
2004
 
1917
2005
  /* Tab */
1918
- &>[role="tab"],
1919
- &>.ui-tab-label {
2006
+ & > [role="tab"],
2007
+ & > .ui-tab-label {
1920
2008
  align-items: center;
1921
2009
  background-color: transparent;
1922
2010
  border-bottom: 2px solid transparent;
@@ -1934,14 +2022,16 @@
1934
2022
  user-select: none;
1935
2023
 
1936
2024
  &:hover {
1937
- background-color: light-dark(oklch(from var(--_accent-color) calc(l * 0.75) none h / 5%),
1938
- oklch(from var(--_accent-color) calc(l * 1.25) none h / 5%));
2025
+ background-color: light-dark(
2026
+ oklch(from var(--_accent-color) calc(l * 0.75) none h / 5%),
2027
+ oklch(from var(--_accent-color) calc(l * 1.25) none h / 5%)
2028
+ );
1939
2029
  }
1940
2030
  }
1941
2031
 
1942
2032
  /* Tab Panel */
1943
- &>[role="tabpanel"],
1944
- &>.ui-tab-panel {
2033
+ & > [role="tabpanel"],
2034
+ & > .ui-tab-panel {
1945
2035
  display: none;
1946
2036
  inline-size: 100%;
1947
2037
  order: 2;
@@ -2011,116 +2101,120 @@
2011
2101
  */
2012
2102
 
2013
2103
  @layer components.root {
2014
- :where(.ui-toggle-button) {
2015
- --_button-bg-color: transparent;
2016
- --_size: var(--field-size);
2017
- --_svg-size: var(--size-4);
2018
-
2019
- align-items: center;
2020
- background-color: var(--_button-bg-color);
2021
- block-size: var(--_size);
2022
- border: 1px solid var(--border-color);
2023
- border-radius: var(--button-border-radius);
2024
- color: var(--text-primary);
2025
- cursor: pointer;
2026
- display: inline-flex;
2027
- flex: auto;
2028
- gap: var(--size-2);
2029
- inline-size: fit-content;
2030
- justify-content: center;
2031
- min-inline-size: var(--_size);
2032
- outline-offset: calc(-1 * var(--size-2));
2033
- padding: 0 var(--size-2);
2034
- position: relative;
2035
- user-select: none;
2036
-
2037
- input[type="checkbox"],
2038
- input[type="radio"] {
2039
- /* utils.css > .ui-sr-only */
2040
- block-size: 1px;
2041
- clip-path: inset(50%);
2042
- inline-size: 1px;
2043
- overflow: hidden;
2044
- position: absolute;
2045
- white-space: nowrap;
2046
- }
2047
-
2048
- /* Element states */
2049
- @media (pointer: fine) {
2050
- &:hover:not(.ui-disabled) {
2051
- --_button-bg-color: light-dark(oklch(0% 0 0 / 0.04), oklch(100% 0 0 / 0.08));
2052
- }
2053
- }
2054
-
2055
- &:has(input:focus-visible) {
2056
- --focus-ring-color: var(--text-muted);
2057
- --focus-ring-offset: -6px;
2058
- outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
2059
- outline-offset: var(--focus-ring-offset);
2060
- }
2061
-
2062
- /* Disabled */
2063
- &.ui-disabled {
2064
- border-color: color-mix(in oklch, var(--border-color) 50%, transparent);
2065
- color: color-mix(in oklch, var(--text-primary) 30%, transparent);
2066
- cursor: not-allowed;
2067
- }
2068
-
2069
- /* svgs */
2070
- svg {
2071
- block-size: var(--_svg-size);
2072
- flex-shrink: 0;
2073
- inline-size: var(--_svg-size);
2074
- }
2075
-
2076
- /* Selected */
2077
- &:has(:where(input[type="checkbox"], input[type="radio"]):checked) {
2078
- --_button-bg-color: oklch(from var(--primary) l c h / 25%);
2079
-
2080
- @media (pointer: fine) {
2081
- &:hover {
2082
- --_button-bg-color: oklch(from var(--primary) l c h / 35%);
2083
- }
2084
- }
2085
- }
2086
-
2087
- /* Sizes */
2088
- &.ui-small {
2089
- --_size: var(--field-size-small);
2090
- }
2091
-
2092
- &.ui-x-small {
2093
- --_size: var(--field-size-x-small);
2094
- }
2095
- }
2104
+ :where(.ui-toggle-button) {
2105
+ --_button-bg-color: transparent;
2106
+ --_size: var(--field-size);
2107
+ --_svg-size: var(--size-4);
2108
+
2109
+ align-items: center;
2110
+ background-color: var(--_button-bg-color);
2111
+ block-size: var(--_size);
2112
+ border: 1px solid var(--border-color);
2113
+ border-radius: var(--button-border-radius);
2114
+ color: var(--text-primary);
2115
+ cursor: pointer;
2116
+ display: inline-flex;
2117
+ flex: auto;
2118
+ gap: var(--size-2);
2119
+ inline-size: fit-content;
2120
+ justify-content: center;
2121
+ min-inline-size: var(--_size);
2122
+ outline-offset: calc(-1 * var(--size-2));
2123
+ padding: 0 var(--size-2);
2124
+ position: relative;
2125
+ user-select: none;
2126
+
2127
+ input[type="checkbox"],
2128
+ input[type="radio"] {
2129
+ /* utils.css > .ui-sr-only */
2130
+ block-size: 1px;
2131
+ clip-path: inset(50%);
2132
+ inline-size: 1px;
2133
+ overflow: hidden;
2134
+ position: absolute;
2135
+ white-space: nowrap;
2136
+ }
2137
+
2138
+ /* Element states */
2139
+ @media (pointer: fine) {
2140
+ &:hover:not(.ui-disabled) {
2141
+ --_button-bg-color: light-dark(
2142
+ oklch(0% 0 0 / 0.04),
2143
+ oklch(100% 0 0 / 0.08)
2144
+ );
2145
+ }
2146
+ }
2147
+
2148
+ &:has(input:focus-visible) {
2149
+ --focus-ring-color: var(--text-muted);
2150
+ --focus-ring-offset: -6px;
2151
+ outline: var(--focus-ring-width) var(--focus-ring-style)
2152
+ var(--focus-ring-color);
2153
+ outline-offset: var(--focus-ring-offset);
2154
+ }
2155
+
2156
+ /* Disabled */
2157
+ &.ui-disabled {
2158
+ border-color: color-mix(in oklch, var(--border-color) 50%, transparent);
2159
+ color: color-mix(in oklch, var(--text-primary) 30%, transparent);
2160
+ cursor: not-allowed;
2161
+ }
2162
+
2163
+ /* svgs */
2164
+ svg {
2165
+ block-size: var(--_svg-size);
2166
+ flex-shrink: 0;
2167
+ inline-size: var(--_svg-size);
2168
+ }
2169
+
2170
+ /* Selected */
2171
+ &:has(:where(input[type="checkbox"], input[type="radio"]):checked) {
2172
+ --_button-bg-color: oklch(from var(--primary) l c h / 25%);
2173
+
2174
+ @media (pointer: fine) {
2175
+ &:hover {
2176
+ --_button-bg-color: oklch(from var(--primary) l c h / 35%);
2177
+ }
2178
+ }
2179
+ }
2180
+
2181
+ /* Sizes */
2182
+ &.ui-small {
2183
+ --_size: var(--field-size-small);
2184
+ }
2185
+
2186
+ &.ui-x-small {
2187
+ --_size: var(--field-size-x-small);
2188
+ }
2189
+ }
2096
2190
  }
2097
2191
 
2098
2192
  @layer components.root {
2099
- :where(.ui-anchor) {
2100
- anchor-name: --anchor;
2101
- anchor-scope: --anchor;
2102
- display: inline-block;
2103
- inline-size: fit-content;
2104
-
2105
- /* Always-visible */
2106
- &>.ui-anchor-floating:not([popover]) {
2107
- block-size: max-content;
2108
- inline-size: max-content;
2109
- position: absolute;
2110
- position-anchor: --anchor;
2111
- position-area: var(--anchor-position-area, start end);
2112
- translate: var(--_anchor-tx, 0) var(--_anchor-ty, 0);
2113
- }
2114
-
2115
- /* Hover-triggered */
2116
- &>.ui-anchor-floating[popover] {
2117
- inset: unset;
2118
- margin: 0;
2119
- position: absolute;
2120
- position-area: var(--anchor-position-area, start end);
2121
- translate: var(--_anchor-tx, 0) var(--_anchor-ty, 0);
2122
- }
2123
- }
2193
+ :where(.ui-anchor) {
2194
+ anchor-name: --anchor;
2195
+ anchor-scope: --anchor;
2196
+ display: inline-block;
2197
+ inline-size: fit-content;
2198
+
2199
+ /* Always-visible */
2200
+ & > .ui-anchor-floating:not([popover]) {
2201
+ block-size: max-content;
2202
+ inline-size: max-content;
2203
+ position: absolute;
2204
+ position-anchor: --anchor;
2205
+ position-area: var(--anchor-position-area, start end);
2206
+ translate: var(--_anchor-tx, 0) var(--_anchor-ty, 0);
2207
+ }
2208
+
2209
+ /* Hover-triggered */
2210
+ & > .ui-anchor-floating[popover] {
2211
+ inset: unset;
2212
+ margin: 0;
2213
+ position: absolute;
2214
+ position-area: var(--anchor-position-area, start end);
2215
+ translate: var(--_anchor-tx, 0) var(--_anchor-ty, 0);
2216
+ }
2217
+ }
2124
2218
  }
2125
2219
 
2126
2220
  @layer components.root {
@@ -2245,7 +2339,7 @@
2245
2339
  --_card-border-width: 1px;
2246
2340
  }
2247
2341
 
2248
- &> :where(hgroup, .ui-content) {
2342
+ & > :where(hgroup, .ui-content) {
2249
2343
  padding-inline: var(--size-3);
2250
2344
 
2251
2345
  &:last-child {
@@ -2254,11 +2348,11 @@
2254
2348
  }
2255
2349
 
2256
2350
  /* Header */
2257
- &>hgroup {
2351
+ & > hgroup {
2258
2352
  padding-block: var(--size-3) 0;
2259
2353
 
2260
2354
  /* Top paragraph */
2261
- &>p:first-of-type:first-child {
2355
+ & > p:first-of-type:first-child {
2262
2356
  line-height: 1.3;
2263
2357
  }
2264
2358
 
@@ -2267,18 +2361,18 @@
2267
2361
  }
2268
2362
 
2269
2363
  /* Bottom paragraph */
2270
- &>p:last-of-type:last-child:not(:first-child) {
2364
+ & > p:last-of-type:last-child:not(:first-child) {
2271
2365
  font-size: var(--font-size-1);
2272
2366
  }
2273
2367
  }
2274
2368
 
2275
2369
  /* Content */
2276
- &>.ui-content:where(:only-child, :first-child) {
2370
+ & > .ui-content:where(:only-child, :first-child) {
2277
2371
  padding-block: var(--size-3) var(--size-4);
2278
2372
  }
2279
2373
 
2280
2374
  /* Actions */
2281
- &>.ui-actions {
2375
+ & > .ui-actions {
2282
2376
  display: flex;
2283
2377
  gap: var(--size-2);
2284
2378
  margin-block: var(--size-2) 0;
@@ -2302,8 +2396,6 @@
2302
2396
  }
2303
2397
  }
2304
2398
  }
2305
-
2306
-
2307
2399
  }
2308
2400
  }
2309
2401
 
@@ -2338,8 +2430,10 @@
2338
2430
 
2339
2431
  &:where(button, a):where(:not([disabled])) {
2340
2432
  &:where(:not(:active)):hover {
2341
- --_bg-color: light-dark(oklch(from var(--surface-tonal) calc(l * 0.98) c h),
2342
- oklch(from var(--surface-tonal) calc(l * 1.1) c h));
2433
+ --_bg-color: light-dark(
2434
+ oklch(from var(--surface-tonal) calc(l * 0.98) c h),
2435
+ oklch(from var(--surface-tonal) calc(l * 1.1) c h)
2436
+ );
2343
2437
  }
2344
2438
  }
2345
2439
 
@@ -2373,7 +2467,8 @@
2373
2467
 
2374
2468
  &:where(:not([disabled])) {
2375
2469
  &:where(:not(:active):hover) {
2376
- --ripple: radial-gradient(circle, transparent 1%, var(--_bg-color) 1%) center/15000%;
2470
+ --ripple: radial-gradient(circle, transparent 1%, var(--_bg-color) 1%)
2471
+ center/15000%;
2377
2472
 
2378
2473
  transition: background var(--button-ripple-duration);
2379
2474
  }
@@ -2387,9 +2482,11 @@
2387
2482
  /* Disabled */
2388
2483
  &:where([disabled]) {
2389
2484
  opacity: 0.64;
2390
- --_color: color-mix(in oklch,
2391
- var(--text-muted) 50%,
2392
- var(--surface-default));
2485
+ --_color: color-mix(
2486
+ in oklch,
2487
+ var(--text-muted) 50%,
2488
+ var(--surface-default)
2489
+ );
2393
2490
  cursor: not-allowed;
2394
2491
  }
2395
2492
  }
@@ -2467,7 +2564,8 @@
2467
2564
  &::after {
2468
2565
  background-color: transparent;
2469
2566
  block-size: 2px;
2470
- border-block-end: var(--_border-width) var(--_border-style) var(--border-color);
2567
+ border-block-end: var(--_border-width) var(--_border-style)
2568
+ var(--border-color);
2471
2569
  content: "";
2472
2570
  order: 1;
2473
2571
  }
@@ -2553,8 +2651,7 @@
2553
2651
  }
2554
2652
 
2555
2653
  /* Remove bottom border only on the last row of the table */
2556
- &>*:last-child tr:last-child {
2557
-
2654
+ & > *:last-child tr:last-child {
2558
2655
  th,
2559
2656
  td {
2560
2657
  border-block-end: none;
@@ -2574,7 +2671,7 @@
2574
2671
  }
2575
2672
 
2576
2673
  /* Round corner cells */
2577
- &>thead:first-of-type tr:first-child {
2674
+ & > thead:first-of-type tr:first-child {
2578
2675
  th:first-child {
2579
2676
  border-start-start-radius: var(--_table-border-radius);
2580
2677
  }
@@ -2585,7 +2682,7 @@
2585
2682
  }
2586
2683
 
2587
2684
  /* Logic for tables without thead */
2588
- &>tbody:first-of-type:not(thead ~ tbody) tr:first-child {
2685
+ & > tbody:first-of-type:not(thead ~ tbody) tr:first-child {
2589
2686
  td:first-child {
2590
2687
  border-start-start-radius: var(--_table-border-radius);
2591
2688
  }
@@ -2596,7 +2693,7 @@
2596
2693
  }
2597
2694
 
2598
2695
  /* Logic for bottom corners (whether in tbody or tfoot) */
2599
- &>*:last-child tr:last-child {
2696
+ & > *:last-child tr:last-child {
2600
2697
  :where(th, td):first-child {
2601
2698
  border-end-start-radius: var(--_table-border-radius);
2602
2699
  }
@@ -2646,7 +2743,6 @@
2646
2743
  }
2647
2744
 
2648
2745
  @container (width < 60ch) {
2649
-
2650
2746
  th,
2651
2747
  td {
2652
2748
  padding: var(--size-1) 0.875rem;
@@ -2655,7 +2751,6 @@
2655
2751
 
2656
2752
  /* Spacious */
2657
2753
  &.ui-spacious {
2658
-
2659
2754
  th,
2660
2755
  td {
2661
2756
  padding: var(--size-3);
@@ -2667,7 +2762,6 @@
2667
2762
  }
2668
2763
 
2669
2764
  @container (width < 60ch) {
2670
-
2671
2765
  th,
2672
2766
  td {
2673
2767
  padding: var(--size-3);
@@ -2677,7 +2771,6 @@
2677
2771
 
2678
2772
  /* Dense */
2679
2773
  &.ui-dense {
2680
-
2681
2774
  th,
2682
2775
  td {
2683
2776
  padding: var(--size-1);
@@ -2689,7 +2782,6 @@
2689
2782
  }
2690
2783
 
2691
2784
  @container (width < 60ch) {
2692
-
2693
2785
  th,
2694
2786
  td {
2695
2787
  padding: var(--size-1);
@@ -2726,7 +2818,7 @@
2726
2818
  --_bg-color: var(--surface-tonal);
2727
2819
  }
2728
2820
 
2729
- &>progress {
2821
+ & > progress {
2730
2822
  appearance: none;
2731
2823
  background: none;
2732
2824
  block-size: 100%;
@@ -2743,7 +2835,8 @@
2743
2835
  background-color: var(--_accent-color);
2744
2836
 
2745
2837
  @media (prefers-reduced-motion: no-preference) {
2746
- transition: inline-size 0.2s var(--ease-out-4, cubic-bezier(0, 0, 0.1, 1));
2838
+ transition: inline-size 0.2s
2839
+ var(--ease-out-4, cubic-bezier(0, 0, 0.1, 1));
2747
2840
  }
2748
2841
  }
2749
2842
 
@@ -2764,7 +2857,7 @@
2764
2857
  will-change: inset-inline-start, inset-inline-end;
2765
2858
  }
2766
2859
 
2767
- &>progress {
2860
+ & > progress {
2768
2861
  &::-webkit-progress-value {
2769
2862
  background-color: transparent;
2770
2863
  }
@@ -2803,13 +2896,14 @@
2803
2896
  }
2804
2897
 
2805
2898
  @layer components.root {
2806
-
2807
- [aria-busy="true"]:not(input,
2899
+ [aria-busy="true"]:not(
2900
+ input,
2808
2901
  select,
2809
2902
  textarea,
2810
2903
  html,
2811
2904
  progress,
2812
- [aria-describedby]) {
2905
+ [aria-describedby]
2906
+ ) {
2813
2907
  position: relative;
2814
2908
 
2815
2909
  &::before {
@@ -2826,397 +2920,401 @@
2826
2920
  vertical-align: -0.14em;
2827
2921
  }
2828
2922
 
2829
- &:not(button.ui-button):not(:empty) {
2923
+ &:not(button.ui-button):not(:empty) {
2924
+ &::before {
2925
+ margin-inline-end: 0.5em;
2926
+ }
2927
+ }
2928
+ }
2929
+
2930
+ @keyframes spin {
2931
+ to {
2932
+ transform: rotate(1turn);
2933
+ }
2934
+ }
2935
+ }
2936
+
2937
+ @layer components.root {
2938
+ label.ui-checkbox {
2939
+ --_input-size: var(--size-4);
2940
+
2941
+ align-items: center;
2942
+ color: var(--text-primary);
2943
+ cursor: pointer;
2944
+ display: inline-grid;
2945
+ gap: 0 var(--size-2);
2946
+ grid-auto-columns: auto;
2947
+ grid-auto-flow: column;
2948
+ inline-size: fit-content;
2949
+ line-height: 1.5;
2950
+ transform: translateZ(0);
2951
+ user-select: none;
2952
+
2953
+ /* Disabled */
2954
+ &:has([disabled]) {
2955
+ cursor: not-allowed;
2956
+ opacity: 0.64;
2957
+ user-select: none;
2958
+
2959
+ input {
2960
+ cursor: not-allowed;
2961
+ }
2962
+ }
2963
+
2964
+ /* Required dot */
2965
+ &:has(:invalid) {
2966
+ .ui-label:after {
2967
+ color: var(--red);
2968
+ content: "*";
2969
+ inset: 0 -0.25ex auto auto;
2970
+ position: absolute;
2971
+ }
2972
+ }
2973
+
2974
+ /* Label */
2975
+ .ui-label {
2976
+ color: var(--text-primary);
2977
+ font-size: var(--font-size-05);
2978
+ grid-column: 2;
2979
+ grid-row: 1;
2980
+ position: relative;
2981
+ padding-inline: 0 1ex;
2982
+ }
2983
+
2984
+ /* End text */
2985
+ :where(.ui-end-text) {
2986
+ color: var(--text-muted);
2987
+ font-size: var(--font-size-0);
2988
+ grid-column: 2;
2989
+ grid-row: 2;
2990
+ line-height: 1.5;
2991
+ z-index: 1;
2992
+ }
2993
+
2994
+ /* Spread layout */
2995
+ &.ui-spread {
2996
+ align-items: center;
2997
+ column-gap: var(--size-4);
2998
+ grid-auto-flow: unset;
2999
+ grid-template-columns: 1fr auto;
3000
+ inline-size: 100%;
3001
+
3002
+ .ui-label {
3003
+ font-weight: 600;
3004
+ grid-column: 1;
3005
+ grid-row: 1;
3006
+ inline-size: fit-content;
3007
+ }
3008
+
3009
+ input {
3010
+ grid-column: 2;
3011
+ grid-row: 1;
3012
+ }
3013
+
3014
+ :where(.ui-end-text) {
3015
+ grid-column: 1;
3016
+ grid-row: 2;
3017
+ }
3018
+ }
3019
+
3020
+ /* Stacked layout */
3021
+ &.ui-stack {
3022
+ justify-items: center;
3023
+ grid-auto-columns: unset;
3024
+
3025
+ .ui-label {
3026
+ grid-column: 1/-1;
3027
+ grid-row: 2;
3028
+ margin-block-start: var(--size-1);
3029
+ padding-inline: 1ex;
3030
+
3031
+ /* Required dot */
3032
+ &::after {
3033
+ inset: 0 -0.25ex auto auto;
3034
+ }
3035
+ }
3036
+
3037
+ .ui-end-text {
3038
+ grid-column: 1/-1;
3039
+ grid-row: 3;
3040
+ }
3041
+ }
3042
+
3043
+ /* Input */
3044
+ input[type="checkbox"] {
3045
+ --_input-size: var(--size-4);
3046
+
3047
+ appearance: none;
3048
+ aspect-ratio: 1;
3049
+ background-color: var(--surface-default);
3050
+ block-size: var(--_input-size);
3051
+ border-radius: var(--radius-1);
3052
+ border: 1px solid var(--border-color);
3053
+ box-sizing: border-box;
3054
+ cursor: pointer;
3055
+ display: grid;
3056
+ font-size: var(--_input-size);
3057
+ inline-size: var(--_input-size);
3058
+ margin: 0;
3059
+ padding: 0;
3060
+ place-items: center;
3061
+ position: relative;
3062
+
3063
+ &:checked,
3064
+ &:indeterminate {
3065
+ background-color: var(--primary);
3066
+ border-color: var(--primary);
3067
+ }
3068
+
3069
+ /* Checkmark */
3070
+ &::after {
3071
+ background-color: var(--primary-contrast);
3072
+ clip-path: polygon(
3073
+ 15% 52%,
3074
+ 40% 77%,
3075
+ 85% 32%,
3076
+ 75% 22%,
3077
+ 40% 57%,
3078
+ 25% 42%
3079
+ );
3080
+ content: "";
3081
+ inset: 0;
3082
+ opacity: 0;
3083
+ position: absolute;
3084
+ }
3085
+
3086
+ &:checked::after,
3087
+ &:indeterminate::after {
3088
+ opacity: 1;
3089
+ }
3090
+
3091
+ /* Indeterminate dash */
3092
+ &:indeterminate::after {
3093
+ clip-path: polygon(20% 45%, 80% 45%, 80% 55%, 20% 55%);
3094
+ }
3095
+
3096
+ &::before {
3097
+ --highlight-size: 175%;
3098
+ }
3099
+ }
3100
+
3101
+ /* Sizes */
3102
+ &.ui-small {
3103
+ input[type="checkbox"] {
3104
+ --_input-size: var(--size-3);
3105
+ }
3106
+ }
3107
+
3108
+ &.ui-large {
3109
+ input[type="checkbox"] {
3110
+ --_input-size: var(--size-5);
3111
+ }
3112
+ }
3113
+
3114
+ /* Validation */
3115
+ &[data-invalid],
3116
+ &:has(:user-invalid) {
3117
+ --primary: var(--critical);
3118
+
3119
+ :where(.ui-end-text) {
3120
+ color: var(--critical);
3121
+ }
3122
+ }
3123
+
3124
+ /* Touch devices */
3125
+ @media (pointer: coarse) {
3126
+ input {
3127
+ --_input-size: var(--size-4);
3128
+ }
3129
+ }
3130
+
3131
+ @media (forced-colors: active) {
3132
+ input {
3133
+ border: 1px solid CanvasText;
3134
+
3135
+ &:checked,
3136
+ &:indeterminate {
3137
+ background-color: SelectedItem;
3138
+ border-color: SelectedItem;
3139
+
3140
+ &::after {
3141
+ background-color: SelectedItemText;
3142
+ }
3143
+ }
3144
+ }
3145
+ }
3146
+ }
3147
+ }
3148
+
3149
+ @layer components.root {
3150
+ label.ui-radio {
3151
+ --_input-size: 1.125rem;
3152
+ --_indicator-size: 50%;
3153
+
3154
+ align-items: center;
3155
+ color: var(--text-primary);
3156
+ cursor: pointer;
3157
+ display: inline-grid;
3158
+ gap: 0 var(--size-2);
3159
+ grid-auto-columns: auto;
3160
+ grid-auto-flow: column;
3161
+ inline-size: fit-content;
3162
+ line-height: 1.5;
3163
+ transform: translateZ(0);
3164
+ user-select: none;
3165
+
3166
+ /* Disabled */
3167
+ &:has([disabled]) {
3168
+ cursor: not-allowed;
3169
+ opacity: 0.64;
3170
+ user-select: none;
3171
+
3172
+ input {
3173
+ cursor: not-allowed;
3174
+ }
3175
+ }
3176
+
3177
+ /* Required dot */
3178
+ &:has(:invalid) {
3179
+ .ui-label:after {
3180
+ color: var(--red);
3181
+ content: "*";
3182
+ inset: 0 -0.25ex auto auto;
3183
+ position: absolute;
3184
+ }
3185
+ }
3186
+
3187
+ /* Label */
3188
+ .ui-label {
3189
+ color: var(--text-primary);
3190
+ font-size: var(--font-size-05);
3191
+ grid-column: 2;
3192
+ grid-row: 1;
3193
+ padding-inline: 0 1ex;
3194
+ position: relative;
3195
+ }
3196
+
3197
+ /* End text */
3198
+ :where(.ui-end-text) {
3199
+ color: var(--text-muted);
3200
+ font-size: var(--font-size-0);
3201
+ grid-column: 2;
3202
+ grid-row: 2;
3203
+ line-height: 1.5;
3204
+ z-index: 1;
3205
+ }
3206
+
3207
+ /* Stacked layout */
3208
+ &.ui-stack {
3209
+ grid-auto-columns: unset;
3210
+ justify-items: center;
3211
+
3212
+ .ui-label {
3213
+ grid-column: 1/-1;
3214
+ grid-row: 2;
3215
+ margin-block-start: var(--size-1);
3216
+ padding-inline: 1ex;
3217
+
3218
+ /* Required dot */
3219
+ &::after {
3220
+ inset: 0 -0.25ex auto auto;
3221
+ }
3222
+ }
3223
+
3224
+ .ui-end-text {
3225
+ grid-column: 1/-1;
3226
+ grid-row: 3;
3227
+ }
3228
+ }
3229
+
3230
+ /* Input */
3231
+ input[type="radio"] {
3232
+ appearance: none;
3233
+ aspect-ratio: 1;
3234
+ background-color: var(--surface-default);
3235
+ block-size: var(--_input-size);
3236
+ border: 1px solid var(--field-border-color);
3237
+ border-radius: var(--radius-round);
3238
+ box-sizing: border-box;
3239
+ cursor: pointer;
3240
+ display: grid;
3241
+ inline-size: var(--_input-size);
3242
+ margin: 0;
3243
+ padding: 0;
3244
+ place-items: center;
3245
+ position: relative;
3246
+
3247
+ &:checked {
3248
+ background-color: var(--primary);
3249
+ border-color: var(--primary);
3250
+ }
3251
+
3252
+ /* Dot */
3253
+ &::after {
3254
+ background-color: var(--primary-contrast);
3255
+ block-size: var(--_indicator-size);
3256
+ border-radius: var(--radius-round);
3257
+ content: "";
3258
+ inline-size: var(--_indicator-size);
3259
+ margin: auto;
3260
+ opacity: 0;
3261
+ }
3262
+
3263
+ &:checked::after {
3264
+ opacity: 1;
3265
+ }
3266
+
2830
3267
  &::before {
2831
- margin-inline-end: 0.5em;
3268
+ --highlight-size: 175%;
2832
3269
  }
2833
3270
  }
2834
- }
2835
3271
 
2836
- @keyframes spin {
2837
- to {
2838
- transform: rotate(1turn);
3272
+ /* Sizes */
3273
+ &.ui-small {
3274
+ input[type="radio"] {
3275
+ --_input-size: var(--size-3);
3276
+ }
2839
3277
  }
2840
- }
2841
- }
2842
3278
 
2843
- @layer components.root {
2844
- label.ui-checkbox {
2845
- --_input-size: var(--size-4);
2846
-
2847
- align-items: center;
2848
- color: var(--text-primary);
2849
- cursor: pointer;
2850
- display: inline-grid;
2851
- gap: 0 var(--size-2);
2852
- grid-auto-columns: auto;
2853
- grid-auto-flow: column;
2854
- inline-size: fit-content;
2855
- line-height: 1.5;
2856
- transform: translateZ(0);
2857
- user-select: none;
2858
-
2859
- /* Disabled */
2860
- &:has([disabled]) {
2861
- cursor: not-allowed;
2862
- opacity: 0.64;
2863
- user-select: none;
2864
-
2865
- input {
2866
- cursor: not-allowed;
2867
- }
2868
- }
2869
-
2870
- /* Required dot */
2871
- &:has(:invalid) {
2872
- .ui-label:after {
2873
- color: var(--red);
2874
- content: "*";
2875
- inset: 0 -0.25ex auto auto;
2876
- position: absolute;
2877
- }
2878
- }
2879
-
2880
- /* Label */
2881
- .ui-label {
2882
- color: var(--text-primary);
2883
- font-size: var(--font-size-05);
2884
- grid-column: 2;
2885
- grid-row: 1;
2886
- position: relative;
2887
- padding-inline: 0 1ex;
2888
- }
2889
-
2890
- /* End text */
2891
- :where(.ui-end-text) {
2892
- color: var(--text-muted);
2893
- font-size: var(--font-size-0);
2894
- grid-column: 2;
2895
- grid-row: 2;
2896
- line-height: 1.5;
2897
- z-index: 1;
2898
- }
2899
-
2900
- /* Spread layout */
2901
- &.ui-spread {
2902
- align-items: center;
2903
- column-gap: var(--size-4);
2904
- grid-auto-flow: unset;
2905
- grid-template-columns: 1fr auto;
2906
- inline-size: 100%;
2907
-
2908
- .ui-label {
2909
- font-weight: 600;
2910
- grid-column: 1;
2911
- grid-row: 1;
2912
- inline-size: fit-content;
2913
- }
2914
-
2915
- input {
2916
- grid-column: 2;
2917
- grid-row: 1;
2918
- }
2919
-
2920
- :where(.ui-end-text) {
2921
- grid-column: 1;
2922
- grid-row: 2;
2923
- }
2924
- }
2925
-
2926
- /* Stacked layout */
2927
- &.ui-stack {
2928
- justify-items: center;
2929
- grid-auto-columns: unset;
2930
-
2931
- .ui-label {
2932
- grid-column: 1/-1;
2933
- grid-row: 2;
2934
- margin-block-start: var(--size-1);
2935
- padding-inline: 1ex;
2936
-
2937
- /* Required dot */
2938
- &::after {
2939
- inset: 0 -0.25ex auto auto;
2940
- }
2941
- }
2942
-
2943
- .ui-end-text {
2944
- grid-column: 1/-1;
2945
- grid-row: 3;
2946
- }
2947
- }
2948
-
2949
- /* Input */
2950
- input[type="checkbox"] {
2951
- --_input-size: var(--size-4);
2952
-
2953
- appearance: none;
2954
- aspect-ratio: 1;
2955
- background-color: var(--surface-default);
2956
- block-size: var(--_input-size);
2957
- border-radius: var(--radius-1);
2958
- border: 1px solid var(--border-color);
2959
- box-sizing: border-box;
2960
- cursor: pointer;
2961
- display: grid;
2962
- font-size: var(--_input-size);
2963
- inline-size: var(--_input-size);
2964
- margin: 0;
2965
- padding: 0;
2966
- place-items: center;
2967
- position: relative;
2968
-
2969
- &:checked,
2970
- &:indeterminate {
2971
- background-color: var(--primary);
2972
- border-color: var(--primary);
2973
- }
2974
-
2975
-
2976
- /* Checkmark */
2977
- &::after {
2978
- background-color: var(--primary-contrast);
2979
- clip-path: polygon(15% 52%, 40% 77%, 85% 32%, 75% 22%, 40% 57%, 25% 42%);
2980
- content: "";
2981
- inset: 0;
2982
- opacity: 0;
2983
- position: absolute;
2984
- }
2985
-
2986
- &:checked::after,
2987
- &:indeterminate::after {
2988
- opacity: 1;
2989
- }
2990
-
2991
- /* Indeterminate dash */
2992
- &:indeterminate::after {
2993
- clip-path: polygon(20% 45%, 80% 45%, 80% 55%, 20% 55%);
2994
- }
2995
-
2996
- &::before {
2997
- --highlight-size: 175%;
2998
- }
2999
- }
3000
-
3001
- /* Sizes */
3002
- &.ui-small {
3003
- input[type="checkbox"] {
3004
- --_input-size: var(--size-3);
3005
- }
3006
- }
3007
-
3008
- &.ui-large {
3009
- input[type="checkbox"] {
3010
- --_input-size: var(--size-5);
3011
- }
3012
- }
3013
-
3014
- /* Validation */
3015
- &[data-invalid],
3016
- &:has(:user-invalid) {
3017
- --palette-source: oklch(0.58 0.21 var(--hue-red));
3018
-
3019
- :where(.ui-end-text) {
3020
- color: var(--primary);
3021
- }
3022
- }
3023
-
3024
- /* Touch devices */
3025
- @media (pointer: coarse) {
3026
- input {
3027
- --_input-size: var(--size-4);
3028
- }
3029
- }
3030
-
3031
- @media (forced-colors: active) {
3032
- input {
3033
- border: 1px solid CanvasText;
3034
-
3035
- &:checked,
3036
- &:indeterminate {
3037
- background-color: SelectedItem;
3038
- border-color: SelectedItem;
3039
-
3040
- &::after {
3041
- background-color: SelectedItemText;
3042
- }
3043
- }
3044
- }
3045
- }
3046
- }
3047
- }
3279
+ &.ui-large {
3280
+ input[type="radio"] {
3281
+ --_input-size: var(--size-4);
3282
+ }
3283
+ }
3048
3284
 
3049
- @layer components.root {
3050
- label.ui-radio {
3051
- --_input-size: 1.125rem;
3052
- --_indicator-size: 50%;
3053
-
3054
- align-items: center;
3055
- color: var(--text-primary);
3056
- cursor: pointer;
3057
- display: inline-grid;
3058
- gap: 0 var(--size-2);
3059
- grid-auto-columns: auto;
3060
- grid-auto-flow: column;
3061
- inline-size: fit-content;
3062
- line-height: 1.5;
3063
- transform: translateZ(0);
3064
- user-select: none;
3065
-
3066
- /* Disabled */
3067
- &:has([disabled]) {
3068
- cursor: not-allowed;
3069
- opacity: 0.64;
3070
- user-select: none;
3071
-
3072
- input {
3073
- cursor: not-allowed;
3074
- }
3075
- }
3076
-
3077
- /* Required dot */
3078
- &:has(:invalid) {
3079
- .ui-label:after {
3080
- color: var(--red);
3081
- content: "*";
3082
- inset: 0 -0.25ex auto auto;
3083
- position: absolute;
3084
- }
3085
- }
3086
-
3087
- /* Label */
3088
- .ui-label {
3089
- color: var(--text-primary);
3090
- font-size: var(--font-size-05);
3091
- grid-column: 2;
3092
- grid-row: 1;
3093
- padding-inline: 0 1ex;
3094
- position: relative;
3095
- }
3096
-
3097
- /* End text */
3098
- :where(.ui-end-text) {
3099
- color: var(--text-muted);
3100
- font-size: var(--font-size-0);
3101
- grid-column: 2;
3102
- grid-row: 2;
3103
- line-height: 1.5;
3104
- z-index: 1;
3105
- }
3106
-
3107
- /* Stacked layout */
3108
- &.ui-stack {
3109
- grid-auto-columns: unset;
3110
- justify-items: center;
3111
-
3112
- .ui-label {
3113
- grid-column: 1/-1;
3114
- grid-row: 2;
3115
- margin-block-start: var(--size-1);
3116
- padding-inline: 1ex;
3117
-
3118
- /* Required dot */
3119
- &::after {
3120
- inset: 0 -0.25ex auto auto;
3121
- }
3122
- }
3123
-
3124
- .ui-end-text {
3125
- grid-column: 1/-1;
3126
- grid-row: 3;
3127
- }
3128
- }
3129
-
3130
- /* Input */
3131
- input[type="radio"] {
3132
- appearance: none;
3133
- aspect-ratio: 1;
3134
- background-color: var(--surface-default);
3135
- block-size: var(--_input-size);
3136
- border: 1px solid var(--field-border-color);
3137
- border-radius: var(--radius-round);
3138
- box-sizing: border-box;
3139
- cursor: pointer;
3140
- display: grid;
3141
- inline-size: var(--_input-size);
3142
- margin: 0;
3143
- padding: 0;
3144
- place-items: center;
3145
- position: relative;
3146
-
3147
- &:checked {
3148
- background-color: var(--primary);
3149
- border-color: var(--primary);
3150
- }
3151
-
3152
- /* Dot */
3153
- &::after {
3154
- background-color: var(--primary-contrast);
3155
- block-size: var(--_indicator-size);
3156
- border-radius: var(--radius-round);
3157
- content: "";
3158
- inline-size: var(--_indicator-size);
3159
- margin: auto;
3160
- opacity: 0;
3161
- }
3162
-
3163
- &:checked::after {
3164
- opacity: 1;
3165
- }
3166
-
3167
- &::before {
3168
- --highlight-size: 175%;
3169
- }
3170
- }
3171
-
3172
- /* Sizes */
3173
- &.ui-small {
3174
- input[type="radio"] {
3175
- --_input-size: var(--size-3);
3176
-
3177
- }
3178
- }
3179
-
3180
- &.ui-large {
3181
- input[type="radio"] {
3182
- --_input-size: var(--size-4);
3183
-
3184
- }
3185
- }
3186
-
3187
- /* Validation */
3188
- &[data-invalid],
3189
- &:has(:user-invalid) {
3190
- --palette-source: oklch(0.58 0.21 var(--hue-red));
3191
-
3192
- :where(.ui-end-text) {
3193
- color: var(--primary);
3194
- }
3195
- }
3196
-
3197
- /* Touch devices */
3198
- @media (pointer: coarse) {
3199
- input[type="radio"] {
3200
- block-size: var(--size-4);
3201
- inline-size: var(--size-4);
3202
- }
3203
- }
3204
-
3205
- @media (forced-colors: active) {
3206
- input[type="radio"] {
3207
- border: 1px solid CanvasText;
3208
-
3209
- &:checked {
3210
- background-color: SelectedItem;
3211
- border-color: SelectedItem;
3212
-
3213
- &::after {
3214
- background-color: SelectedItemText;
3215
- }
3216
- }
3217
- }
3218
- }
3219
- }
3285
+ /* Validation */
3286
+ &[data-invalid],
3287
+ &:has(:user-invalid) {
3288
+ --primary: var(--critical);
3289
+
3290
+ :where(.ui-end-text) {
3291
+ color: var(--critical);
3292
+ }
3293
+ }
3294
+
3295
+ /* Touch devices */
3296
+ @media (pointer: coarse) {
3297
+ input[type="radio"] {
3298
+ block-size: var(--size-4);
3299
+ inline-size: var(--size-4);
3300
+ }
3301
+ }
3302
+
3303
+ @media (forced-colors: active) {
3304
+ input[type="radio"] {
3305
+ border: 1px solid CanvasText;
3306
+
3307
+ &:checked {
3308
+ background-color: SelectedItem;
3309
+ border-color: SelectedItem;
3310
+
3311
+ &::after {
3312
+ background-color: SelectedItemText;
3313
+ }
3314
+ }
3315
+ }
3316
+ }
3317
+ }
3220
3318
  }
3221
3319
 
3222
3320
  @layer components.root {
@@ -3277,7 +3375,7 @@
3277
3375
  margin-top: calc(var(--size-1) * -1);
3278
3376
  padding-inline: calc(3ex / 2);
3279
3377
 
3280
- &>option {
3378
+ & > option {
3281
3379
  display: flex;
3282
3380
  inline-size: 0;
3283
3381
  justify-content: center;
@@ -3458,9 +3556,11 @@
3458
3556
  /* Track */
3459
3557
  &::-webkit-slider-runnable-track {
3460
3558
  appearance: none;
3461
- background: linear-gradient(to right,
3462
- var(--_track-fill-color) var(--_track-fill, 0%),
3463
- var(--_track-color) 0%);
3559
+ background: linear-gradient(
3560
+ to right,
3561
+ var(--_track-fill-color) var(--_track-fill, 0%),
3562
+ var(--_track-color) 0%
3563
+ );
3464
3564
  block-size: var(--_track-height);
3465
3565
  border-radius: var(--_track-radius);
3466
3566
  }
@@ -3486,7 +3586,8 @@
3486
3586
  block-size: var(--_thumb-size);
3487
3587
  border: 3px solid var(--surface-default);
3488
3588
  border-radius: 50%;
3489
- box-shadow: 0 0 0 var(--_thumb-highlight-size) var(--_thumb-highlight-color);
3589
+ box-shadow: 0 0 0 var(--_thumb-highlight-size)
3590
+ var(--_thumb-highlight-color);
3490
3591
  cursor: ew-resize;
3491
3592
  inline-size: var(--_thumb-size);
3492
3593
  margin-block-start: var(--_thumb-offset);
@@ -3506,7 +3607,8 @@
3506
3607
  block-size: var(--_thumb-size);
3507
3608
  border: 3px solid var(--surface-default);
3508
3609
  border-radius: 50%;
3509
- box-shadow: 0 0 0 var(--_thumb-highlight-size) var(--_thumb-highlight-color);
3610
+ box-shadow: 0 0 0 var(--_thumb-highlight-size)
3611
+ var(--_thumb-highlight-color);
3510
3612
  cursor: ew-resize;
3511
3613
  inline-size: var(--_thumb-size);
3512
3614
  margin-block-start: var(--_thumb-offset);
@@ -3533,8 +3635,10 @@
3533
3635
 
3534
3636
  &:active {
3535
3637
  --_thumb-highlight-size: var(--size-2);
3536
- --_track-color: light-dark(oklch(from var(--field-border-color) calc(l * 0.9) c h),
3537
- oklch(from var(--field-border-color) calc(l * 1.1) c h));
3638
+ --_track-color: light-dark(
3639
+ oklch(from var(--field-border-color) calc(l * 0.9) c h),
3640
+ oklch(from var(--field-border-color) calc(l * 1.1) c h)
3641
+ );
3538
3642
  }
3539
3643
  }
3540
3644
 
@@ -3554,7 +3658,6 @@
3554
3658
  }
3555
3659
  }
3556
3660
  }
3557
-
3558
3661
  }
3559
3662
 
3560
3663
  @layer components.root {
@@ -3603,7 +3706,8 @@
3603
3706
 
3604
3707
  &:focus-visible {
3605
3708
  --focus-ring-color: currentColor;
3606
- outline: var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color);
3709
+ outline: var(--focus-ring-width) var(--focus-ring-style)
3710
+ var(--focus-ring-color);
3607
3711
  outline-offset: var(--focus-ring-offset);
3608
3712
  }
3609
3713
 
@@ -3635,13 +3739,14 @@
3635
3739
  --_dot-bg-color: var(--_accent-contrast);
3636
3740
  --_dot-outline-size: calc(var(--size-1) - 1px);
3637
3741
 
3638
- inset-inline-start: calc(var(--_track-width) - var(--_dot-size) - var(--size-1));
3742
+ inset-inline-start: calc(
3743
+ var(--_track-width) - var(--_dot-size) - var(--size-1)
3744
+ );
3639
3745
  }
3640
3746
  }
3641
3747
 
3642
3748
  /* Animation */
3643
3749
  @media (prefers-reduced-motion: no-preference) {
3644
-
3645
3750
  /* Track */
3646
3751
  &::before {
3647
3752
  transition:
@@ -3701,7 +3806,9 @@
3701
3806
  }
3702
3807
 
3703
3808
  .ui-icon-unchecked {
3704
- margin-inline-start: calc(var(--_track-width) - var(--_dot-size) - var(--size-1));
3809
+ margin-inline-start: calc(
3810
+ var(--_track-width) - var(--_dot-size) - var(--size-1)
3811
+ );
3705
3812
  }
3706
3813
 
3707
3814
  .ui-icon-checked {
@@ -3780,7 +3887,6 @@
3780
3887
  }
3781
3888
 
3782
3889
  &:has(.ui-icon-checked, .ui-icon-unchecked) {
3783
-
3784
3890
  input[role="switch"],
3785
3891
  .ui-icon-checked,
3786
3892
  .ui-icon-unchecked {
@@ -3827,169 +3933,167 @@
3827
3933
  }
3828
3934
 
3829
3935
  @layer components.extended {
3830
- :where(#toast-manager) {
3831
- background: none;
3832
- block-size: auto;
3833
- border: none;
3834
- display: none;
3835
- flex-direction: column-reverse;
3836
- gap: var(--size-3);
3837
- inline-size: auto;
3838
- inset: auto var(--size-4) var(--size-4) auto;
3839
- margin: 0;
3840
- max-inline-size: calc(100vi - var(--size-8));
3841
- overflow: visible;
3842
- padding: 0;
3843
- pointer-events: none;
3844
- position: fixed;
3845
- z-index: 1000;
3846
-
3847
- &:popover-open {
3848
- display: flex;
3849
- }
3850
-
3851
- &::backdrop {
3852
- display: none;
3853
- }
3854
-
3855
- /* Optional cap on visible toasts. Older toasts beyond this depth are hidden
3936
+ :where(#toast-manager) {
3937
+ background: none;
3938
+ block-size: auto;
3939
+ border: none;
3940
+ display: none;
3941
+ flex-direction: column-reverse;
3942
+ gap: var(--size-3);
3943
+ inline-size: auto;
3944
+ inset: auto var(--size-4) var(--size-4) auto;
3945
+ margin: 0;
3946
+ max-inline-size: calc(100vi - var(--size-8));
3947
+ overflow: visible;
3948
+ padding: 0;
3949
+ pointer-events: none;
3950
+ position: fixed;
3951
+ z-index: 1000;
3952
+
3953
+ &:popover-open {
3954
+ display: flex;
3955
+ }
3956
+
3957
+ &::backdrop {
3958
+ display: none;
3959
+ }
3960
+
3961
+ /* Optional cap on visible toasts. Older toasts beyond this depth are hidden
3856
3962
  but still in the DOM so they animate cleanly when newer ones are removed. */
3857
- /* > .toast:nth-last-child(n + 6) { display: none; } */
3858
- }
3859
-
3860
- :where(.ui-toast) {
3861
- --_anim-enter: 0.3s;
3862
- --_anim-exit: 0.3s;
3863
-
3864
- align-items: center;
3865
- animation:
3866
- toast-enter var(--_anim-enter) var(--ease-out-3) both,
3867
- toast-hold attr(data-duration type(<time>), 5s) linear both,
3868
- toast-exit var(--_anim-exit) var(--ease-in-3) both;
3869
- animation-delay:
3870
- 0s,
3871
- var(--_anim-enter),
3872
- calc(var(--_anim-enter) + attr(data-duration type(<time>), 5s));
3873
- background-color: light-dark(var(--gray-15), var(--gray-2));
3874
- border-radius: var(--border-radius);
3875
- box-shadow: var(--shadow-3);
3876
- color: var(--text-primary-contrast);
3877
- display: flex;
3878
- gap: var(--size-3);
3879
- justify-content: space-between;
3880
- min-inline-size: 30ch;
3881
- padding: var(--size-3) var(--size-4);
3882
- pointer-events: auto;
3883
-
3884
- &:hover {
3885
- animation-play-state: paused;
3886
- }
3887
-
3888
- &.ui-exiting {
3889
- animation: toast-exit var(--_anim-exit) var(--ease-in-3) forwards;
3890
- }
3891
-
3892
- .ui-icon {
3893
- background: no-repeat center / contain;
3894
- block-size: var(--size-4);
3895
- flex-shrink: 0;
3896
- inline-size: var(--size-4);
3897
- }
3898
-
3899
- /* Hide the icon slot when there's no severity to render against. */
3900
- &:not([data-severity]) .ui-icon {
3901
- display: none;
3902
- }
3903
-
3904
- .ui-content {
3905
- font-size: var(--font-size-05);
3906
- word-break: break-word;
3907
- }
3908
-
3909
- .ui-title {
3910
- font-weight: 600;
3911
- }
3912
-
3913
- .ui-description {
3914
- color: oklch(from currentColor l c h / 75%);
3915
- font-size: var(--font-size-0);
3916
- }
3917
-
3918
- .ui-close-button {
3919
- background: none;
3920
- border: none;
3921
- color: inherit;
3922
- cursor: pointer;
3923
- display: grid;
3924
- opacity: 0.7;
3925
- padding: var(--size-1);
3926
- place-items: center;
3927
- transition: opacity 0.2s;
3928
-
3929
- &:hover {
3930
- opacity: 1;
3931
- }
3932
- }
3933
-
3934
- /* Severity icons via CSS data URIs — keeps icon assets out of JS strings. */
3935
- &[data-severity="success"] .ui-icon {
3936
- background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/><path d='m9 11 3 3L22 4'/></svg>");
3937
- }
3938
-
3939
- &[data-severity="info"] .ui-icon {
3940
- background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M12 16v-4'/><path d='M12 8h.01'/></svg>");
3941
- }
3942
-
3943
- &[data-severity="warning"] .ui-icon {
3944
- background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/><path d='M12 9v4'/><path d='M12 17h.01'/></svg>");
3945
- }
3946
-
3947
- &[data-severity="critical"] .ui-icon {
3948
- background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='m15 9-6 6'/><path d='m9 9 6 6'/></svg>");
3949
- }
3950
- }
3951
-
3952
- @keyframes toast-enter {
3953
- from {
3954
- opacity: 0;
3955
- translate: var(--size-4) 0;
3956
- }
3957
-
3958
- to {
3959
- opacity: 1;
3960
- translate: 0 0;
3961
- }
3962
- }
3963
-
3964
- /* Identity keyframe — only purpose is to delay the exit animation by the
3963
+ /* > .toast:nth-last-child(n + 6) { display: none; } */
3964
+ }
3965
+
3966
+ :where(.ui-toast) {
3967
+ --_anim-enter: 0.3s;
3968
+ --_anim-exit: 0.3s;
3969
+
3970
+ align-items: center;
3971
+ animation:
3972
+ toast-enter var(--_anim-enter) var(--ease-out-3) both,
3973
+ toast-hold attr(data-duration type(<time>), 5s) linear both,
3974
+ toast-exit var(--_anim-exit) var(--ease-in-3) both;
3975
+ animation-delay:
3976
+ 0s, var(--_anim-enter),
3977
+ calc(var(--_anim-enter) + attr(data-duration type(<time>), 5s));
3978
+ background-color: light-dark(var(--gray-15), var(--gray-2));
3979
+ border-radius: var(--border-radius);
3980
+ box-shadow: var(--shadow-3);
3981
+ color: var(--text-primary-contrast);
3982
+ display: flex;
3983
+ gap: var(--size-3);
3984
+ justify-content: space-between;
3985
+ min-inline-size: 30ch;
3986
+ padding: var(--size-3) var(--size-4);
3987
+ pointer-events: auto;
3988
+
3989
+ &:hover {
3990
+ animation-play-state: paused;
3991
+ }
3992
+
3993
+ &.ui-exiting {
3994
+ animation: toast-exit var(--_anim-exit) var(--ease-in-3) forwards;
3995
+ }
3996
+
3997
+ .ui-icon {
3998
+ background: no-repeat center / contain;
3999
+ block-size: var(--size-4);
4000
+ flex-shrink: 0;
4001
+ inline-size: var(--size-4);
4002
+ }
4003
+
4004
+ /* Hide the icon slot when there's no severity to render against. */
4005
+ &:not([data-severity]) .ui-icon {
4006
+ display: none;
4007
+ }
4008
+
4009
+ .ui-content {
4010
+ font-size: var(--font-size-05);
4011
+ word-break: break-word;
4012
+ }
4013
+
4014
+ .ui-title {
4015
+ font-weight: 600;
4016
+ }
4017
+
4018
+ .ui-description {
4019
+ color: oklch(from currentColor l c h / 75%);
4020
+ font-size: var(--font-size-0);
4021
+ }
4022
+
4023
+ .ui-close-button {
4024
+ background: none;
4025
+ border: none;
4026
+ color: inherit;
4027
+ cursor: pointer;
4028
+ display: grid;
4029
+ opacity: 0.7;
4030
+ padding: var(--size-1);
4031
+ place-items: center;
4032
+ transition: opacity 0.2s;
4033
+
4034
+ &:hover {
4035
+ opacity: 1;
4036
+ }
4037
+ }
4038
+
4039
+ /* Severity icons via CSS data URIs — keeps icon assets out of JS strings. */
4040
+ &[data-severity="success"] .ui-icon {
4041
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/><path d='m9 11 3 3L22 4'/></svg>");
4042
+ }
4043
+
4044
+ &[data-severity="info"] .ui-icon {
4045
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M12 16v-4'/><path d='M12 8h.01'/></svg>");
4046
+ }
4047
+
4048
+ &[data-severity="warning"] .ui-icon {
4049
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/><path d='M12 9v4'/><path d='M12 17h.01'/></svg>");
4050
+ }
4051
+
4052
+ &[data-severity="critical"] .ui-icon {
4053
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='m15 9-6 6'/><path d='m9 9 6 6'/></svg>");
4054
+ }
4055
+ }
4056
+
4057
+ @keyframes toast-enter {
4058
+ from {
4059
+ opacity: 0;
4060
+ translate: var(--size-4) 0;
4061
+ }
4062
+
4063
+ to {
4064
+ opacity: 1;
4065
+ translate: 0 0;
4066
+ }
4067
+ }
4068
+
4069
+ /* Identity keyframe — only purpose is to delay the exit animation by the
3965
4070
  author-defined duration. */
3966
- @keyframes toast-hold {
3967
- from {
3968
- opacity: 1;
3969
- }
3970
-
3971
- to {
3972
- opacity: 1;
3973
- }
3974
- }
3975
-
3976
- @keyframes toast-exit {
3977
- from {
3978
- opacity: 1;
3979
- scale: 1;
3980
- translate: 0 0;
3981
- }
3982
-
3983
- to {
3984
- opacity: 0;
3985
- scale: 0.9;
3986
- translate: 0 var(--size-4);
3987
- }
3988
- }
4071
+ @keyframes toast-hold {
4072
+ from {
4073
+ opacity: 1;
4074
+ }
4075
+
4076
+ to {
4077
+ opacity: 1;
4078
+ }
4079
+ }
4080
+
4081
+ @keyframes toast-exit {
4082
+ from {
4083
+ opacity: 1;
4084
+ scale: 1;
4085
+ translate: 0 0;
4086
+ }
4087
+
4088
+ to {
4089
+ opacity: 0;
4090
+ scale: 0.9;
4091
+ translate: 0 var(--size-4);
4092
+ }
4093
+ }
3989
4094
  }
3990
4095
 
3991
4096
  @layer components.root {
3992
-
3993
4097
  :where(.ui-p) {
3994
4098
  text-wrap: pretty;
3995
4099
 
@@ -4044,8 +4148,10 @@
4044
4148
 
4045
4149
  /** Overline */
4046
4150
  :where(.ui-overline) {
4047
- color: light-dark(oklch(from var(--text-muted) calc(l * 1.25) c h),
4048
- oklch(from var(--text-muted) calc(l * 0.75) c h));
4151
+ color: light-dark(
4152
+ oklch(from var(--text-muted) calc(l * 1.25) c h),
4153
+ oklch(from var(--text-muted) calc(l * 0.75) c h)
4154
+ );
4049
4155
  font-size: var(--font-size-0);
4050
4156
  font-weight: 500;
4051
4157
  letter-spacing: 0.06em;
@@ -4053,18 +4159,20 @@
4053
4159
  }
4054
4160
 
4055
4161
  :where(.ui-hgroup) {
4056
- &>p {
4162
+ & > p {
4057
4163
  margin: 0;
4058
4164
  }
4059
4165
 
4060
- &> :where(h1, h2, h3, h4, h5, h6) {
4166
+ & > :where(h1, h2, h3, h4, h5, h6) {
4061
4167
  margin-block: 0 0.4em;
4062
4168
  }
4063
4169
 
4064
4170
  /* First p element (overline) */
4065
- &>p:first-of-type:first-child {
4066
- color: light-dark(oklch(from var(--text-muted) calc(l * 1.25) c h),
4067
- oklch(from var(--text-muted) calc(l * 0.75) c h));
4171
+ & > p:first-of-type:first-child {
4172
+ color: light-dark(
4173
+ oklch(from var(--text-muted) calc(l * 1.25) c h),
4174
+ oklch(from var(--text-muted) calc(l * 0.75) c h)
4175
+ );
4068
4176
  font-size: var(--font-size-0);
4069
4177
  font-weight: 500;
4070
4178
  letter-spacing: 0.06em;
@@ -4072,13 +4180,13 @@
4072
4180
  }
4073
4181
 
4074
4182
  /* Body paragraphs after the heading */
4075
- &>p:not(:first-of-type:first-child) {
4183
+ & > p:not(:first-of-type:first-child) {
4076
4184
  color: oklch(from currentColor l c h / 75%);
4077
4185
  font-size: var(--font-size-3);
4078
4186
  line-height: 1.6;
4079
4187
  }
4080
4188
 
4081
- &>p+p {
4189
+ & > p + p {
4082
4190
  margin-block-start: 0.75em;
4083
4191
  }
4084
4192
  }
@@ -4090,8 +4198,6 @@
4090
4198
  line-height: 1.6;
4091
4199
  }
4092
4200
 
4093
-
4094
-
4095
4201
  /* Inline text elements — class utilities (work anywhere) */
4096
4202
  :where(.ui-u, .ui-abbr, .ui-dfn) {
4097
4203
  text-decoration: underline;
@@ -4144,7 +4250,7 @@
4144
4250
  :where(.ui-mark) {
4145
4251
  border-radius: var(--radius-2);
4146
4252
  box-decoration-break: clone;
4147
- padding: .1ex .3ex;
4253
+ padding: 0.1ex 0.3ex;
4148
4254
  vertical-align: baseline;
4149
4255
  }
4150
4256
 
@@ -4217,7 +4323,7 @@
4217
4323
  scrollbar-width: thin;
4218
4324
  white-space: pre;
4219
4325
 
4220
- >code {
4326
+ > code {
4221
4327
  background: none;
4222
4328
  border-radius: 0;
4223
4329
  color: inherit;
@@ -4227,7 +4333,6 @@
4227
4333
  writing-mode: inherit;
4228
4334
  }
4229
4335
  }
4230
-
4231
4336
  }
4232
4337
 
4233
4338
  /* Rich text */
@@ -4245,7 +4350,6 @@
4245
4350
  text-underline-offset: 2px;
4246
4351
 
4247
4352
  &[href] {
4248
-
4249
4353
  &:hover,
4250
4354
  &:focus-visible {
4251
4355
  color: var(--primary-light);
@@ -4295,7 +4399,7 @@
4295
4399
  overflow-x: auto;
4296
4400
  scrollbar-width: thin;
4297
4401
 
4298
- >code {
4402
+ > code {
4299
4403
  background: none;
4300
4404
  border-radius: 0;
4301
4405
  color: inherit;
@@ -4306,7 +4410,6 @@
4306
4410
  }
4307
4411
  }
4308
4412
 
4309
-
4310
4413
  /* Text */
4311
4414
  p {
4312
4415
  font-size: inherit;
@@ -4320,7 +4423,7 @@
4320
4423
  font-weight: 700;
4321
4424
  text-wrap: pretty;
4322
4425
 
4323
- &+*:not(&) {
4426
+ & + *:not(&) {
4324
4427
  margin-block-start: 0;
4325
4428
  }
4326
4429
  }
@@ -4367,8 +4470,10 @@
4367
4470
 
4368
4471
  /** Overline */
4369
4472
  :is(.ui-overline, hgroup p:first-of-type:first-child) {
4370
- color: light-dark(oklch(from var(--text-muted) calc(l * 1.25) c h),
4371
- oklch(from var(--text-muted) calc(l * 0.75) c h));
4473
+ color: light-dark(
4474
+ oklch(from var(--text-muted) calc(l * 1.25) c h),
4475
+ oklch(from var(--text-muted) calc(l * 0.75) c h)
4476
+ );
4372
4477
  font-size: var(--font-size-0);
4373
4478
  font-weight: 500;
4374
4479
  letter-spacing: 0.06em;
@@ -4376,26 +4481,26 @@
4376
4481
  }
4377
4482
 
4378
4483
  hgroup {
4379
- &>p {
4484
+ & > p {
4380
4485
  margin: 0;
4381
4486
  }
4382
4487
 
4383
- &> :where(h1, h2, h3, h4, h5, h6) {
4488
+ & > :where(h1, h2, h3, h4, h5, h6) {
4384
4489
  margin-block: 0 0.4em;
4385
4490
  }
4386
4491
 
4387
- &+* {
4492
+ & + * {
4388
4493
  margin-block-start: 3em;
4389
4494
  }
4390
4495
 
4391
4496
  /* Body paragraphs after the heading */
4392
- &>p:not(:first-of-type:first-child) {
4497
+ & > p:not(:first-of-type:first-child) {
4393
4498
  color: oklch(from currentColor l c h / 75%);
4394
4499
  font-size: var(--font-size-3);
4395
4500
  line-height: 1.6;
4396
4501
  }
4397
4502
 
4398
- &>p+p {
4503
+ & > p + p {
4399
4504
  margin-block-start: 0.75em;
4400
4505
  }
4401
4506
  }
@@ -4457,7 +4562,7 @@
4457
4562
  margin-block: var(--size-7);
4458
4563
  place-items: center;
4459
4564
 
4460
- &>* {
4565
+ & > * {
4461
4566
  margin-block: 0;
4462
4567
  }
4463
4568
 
@@ -4468,18 +4573,18 @@
4468
4573
  }
4469
4574
 
4470
4575
  /* Remove top margin from first child */
4471
- &> :first-child {
4576
+ & > :first-child {
4472
4577
  margin-block-start: 0;
4473
4578
  }
4474
4579
 
4475
4580
  /* Remove bottom margin from last child */
4476
- &> :last-child {
4581
+ & > :last-child {
4477
4582
  margin-block-end: 0;
4478
4583
  }
4479
4584
 
4480
4585
  /* Horizontal rules */
4481
4586
  hr {
4482
- &+* {
4587
+ & + * {
4483
4588
  margin-block-start: 0;
4484
4589
  }
4485
4590
  }
@@ -4560,7 +4665,7 @@
4560
4665
  mark {
4561
4666
  border-radius: var(--radius-2);
4562
4667
  box-decoration-break: clone;
4563
- padding: .1ex .3ex;
4668
+ padding: 0.1ex 0.3ex;
4564
4669
  vertical-align: baseline;
4565
4670
  }
4566
4671
 
@@ -4594,14 +4699,14 @@
4594
4699
 
4595
4700
  /* Floating wrapper: traditional inset-based positioning so this works
4596
4701
  in browsers without position-area support (Firefox, older Safari). */
4597
- &>.ui-anchor-floating:not([popover]) {
4702
+ & > .ui-anchor-floating:not([popover]) {
4598
4703
  inset: var(--_badge-inset);
4599
4704
  position-anchor: auto;
4600
4705
  position-area: none;
4601
4706
  }
4602
4707
 
4603
4708
  /* Indicator */
4604
- &>.ui-anchor-floating>.ui-badge-indicator {
4709
+ & > .ui-anchor-floating > .ui-badge-indicator {
4605
4710
  background-color: var(--_bg-color);
4606
4711
  block-size: var(--_size);
4607
4712
  border: 2px solid var(--_border-color);
@@ -4670,7 +4775,7 @@
4670
4775
  --_anchor-ty: var(--_dot-size);
4671
4776
  }
4672
4777
 
4673
- &.ui-dot>.ui-anchor-floating>.ui-badge-indicator {
4778
+ &.ui-dot > .ui-anchor-floating > .ui-badge-indicator {
4674
4779
  block-size: var(--_dot-size);
4675
4780
  inline-size: var(--_dot-size);
4676
4781
  min-inline-size: var(--_dot-size);
@@ -4678,7 +4783,7 @@
4678
4783
  }
4679
4784
 
4680
4785
  /* Visibility */
4681
- &.ui-invisible>.ui-anchor-floating>.ui-badge-indicator {
4786
+ &.ui-invisible > .ui-anchor-floating > .ui-badge-indicator {
4682
4787
  opacity: 0;
4683
4788
  pointer-events: none;
4684
4789
  }
@@ -4698,8 +4803,10 @@
4698
4803
  border-radius: 0;
4699
4804
 
4700
4805
  /* button.css > --_accent-tonal */
4701
- --_divider-color: light-dark(oklch(from var(--_accent-tonal) calc(l - 0.1) c h),
4702
- oklch(from var(--_accent-tonal) calc(l + 0.1) c h));
4806
+ --_divider-color: light-dark(
4807
+ oklch(from var(--_accent-tonal) calc(l - 0.1) c h),
4808
+ oklch(from var(--_accent-tonal) calc(l + 0.1) c h)
4809
+ );
4703
4810
 
4704
4811
  &.ui-outlined {
4705
4812
  --_divider-color: var(--_border-color);
@@ -4716,16 +4823,19 @@
4716
4823
  /* Color inheritance from Button Group — shared interaction model.
4717
4824
  The .critical scope class in theme.css redirects --palette-source so
4718
4825
  --color-6 below becomes a tint of the active color. */
4719
- :where(.ui-button-group.ui-critical,
4720
- .ui-button-group.ui-primary) & {
4826
+ :where(.ui-button-group.ui-critical, .ui-button-group.ui-primary) & {
4721
4827
  --_color-contrast: var(--gray-1);
4722
4828
  --_color-tonal: var(--color-6);
4723
4829
  --_accent-tonal-contrast: var(--text-primary-contrast);
4724
4830
  --_default-hover-bg-color: oklch(from var(--_accent) l c h / 15%);
4725
4831
  --_default-active-bg-color: oklch(from var(--_accent) l c h / 25%);
4726
4832
  --_filled-hover-bg-color: oklch(from var(--_accent) calc(l - 0.1) c h);
4727
- --_filled-active-bg-color: oklch(from var(--_accent) calc(l - 0.15) c h);
4728
- --_outlined-active-bg-color: oklch(from var(--_accent) calc(l - 0.1) c h);
4833
+ --_filled-active-bg-color: oklch(
4834
+ from var(--_accent) calc(l - 0.15) c h
4835
+ );
4836
+ --_outlined-active-bg-color: oklch(
4837
+ from var(--_accent) calc(l - 0.1) c h
4838
+ );
4729
4839
  }
4730
4840
 
4731
4841
  :where(.ui-button-group.ui-critical) & {
@@ -4788,10 +4898,11 @@
4788
4898
  --_text-color: var(--_accent-contrast);
4789
4899
  --_divider-color: currentColor;
4790
4900
 
4791
- :where(.ui-button-group.ui-critical,
4792
- .ui-button-group.ui-primary) & {
4793
- --_divider-color: light-dark(oklch(from var(--_accent) calc(l - 0.1) c h),
4794
- oklch(from var(--_accent) calc(l + 0.1) c h));
4901
+ :where(.ui-button-group.ui-critical, .ui-button-group.ui-primary) & {
4902
+ --_divider-color: light-dark(
4903
+ oklch(from var(--_accent) calc(l - 0.1) c h),
4904
+ oklch(from var(--_accent) calc(l + 0.1) c h)
4905
+ );
4795
4906
  }
4796
4907
 
4797
4908
  &:where(:not([disabled])) {
@@ -4819,13 +4930,17 @@
4819
4930
  }
4820
4931
 
4821
4932
  /* Siblings */
4822
- &+& {
4933
+ & + & {
4823
4934
  border-inline-start-color: var(--_divider-color);
4824
4935
  border-inline-width: 1px;
4825
4936
  margin-inline-start: -1px;
4826
4937
 
4827
4938
  &[disabled] {
4828
- border-inline-start-color: color-mix(in oklch, var(--_divider-color) 40%, transparent);
4939
+ border-inline-start-color: color-mix(
4940
+ in oklch,
4941
+ var(--_divider-color) 40%,
4942
+ transparent
4943
+ );
4829
4944
  }
4830
4945
  }
4831
4946
  }
@@ -4852,12 +4967,16 @@
4852
4967
  border-end-end-radius: var(--_border-radius);
4853
4968
  }
4854
4969
 
4855
- &+& {
4970
+ & + & {
4856
4971
  border-block-start: 1px solid var(--_divider-color);
4857
4972
  margin-block-start: -1px;
4858
4973
 
4859
4974
  &[disabled] {
4860
- border-block-start-color: color-mix(in oklch, var(--_divider-color) 40%, transparent);
4975
+ border-block-start-color: color-mix(
4976
+ in oklch,
4977
+ var(--_divider-color) 40%,
4978
+ transparent
4979
+ );
4861
4980
  }
4862
4981
  }
4863
4982
  }
@@ -4936,7 +5055,7 @@
4936
5055
  }
4937
5056
 
4938
5057
  /* Layout */
4939
- &>summary {
5058
+ & > summary {
4940
5059
  background-color: inherit;
4941
5060
  cursor: pointer;
4942
5061
  font-weight: 700;
@@ -4961,17 +5080,17 @@
4961
5080
  }
4962
5081
  }
4963
5082
 
4964
- &[open]>summary svg {
5083
+ &[open] > summary svg {
4965
5084
  rotate: 180deg;
4966
5085
  }
4967
5086
 
4968
- &>.ui-content {
5087
+ & > .ui-content {
4969
5088
  margin-block-start: 0;
4970
5089
  padding-block: var(--_content-padding-block);
4971
5090
  padding-inline: var(--_content-padding-inline);
4972
5091
  }
4973
5092
 
4974
- &>.ui-actions {
5093
+ & > .ui-actions {
4975
5094
  display: flex;
4976
5095
  gap: var(--_actions-gap);
4977
5096
  justify-content: end;
@@ -4996,12 +5115,12 @@
4996
5115
  }
4997
5116
  }
4998
5117
 
4999
- &>.ui-content {
5118
+ & > .ui-content {
5000
5119
  margin-block: 0;
5001
5120
  padding: 0;
5002
5121
  }
5003
5122
 
5004
- &>details.ui-accordion {
5123
+ & > details.ui-accordion {
5005
5124
  --_border-color: transparent;
5006
5125
  --_border-width: 0;
5007
5126
  --_margin-inline: 0;
@@ -5010,7 +5129,7 @@
5010
5129
  --_summary-padding-inline: var(--_item-summary-padding-inline);
5011
5130
 
5012
5131
  /* Border between accordion items */
5013
- &+& {
5132
+ & + & {
5014
5133
  border-block-start: 1px solid var(--_gutter-color);
5015
5134
  border-radius: 0;
5016
5135
  }
@@ -5041,7 +5160,6 @@
5041
5160
  }
5042
5161
 
5043
5162
  @layer components.extended {
5044
-
5045
5163
  /*
5046
5164
  Lists meant to be used stand-alone or as part of Select elements
5047
5165
 
@@ -5059,7 +5177,6 @@ Lists meant to be used stand-alone or as part of Select elements
5059
5177
  padding: var(--size-2) 0;
5060
5178
 
5061
5179
  @media (pointer: coarse) {
5062
-
5063
5180
  &,
5064
5181
  * {
5065
5182
  user-select: none;
@@ -5119,14 +5236,14 @@ Lists meant to be used stand-alone or as part of Select elements
5119
5236
  padding: 0;
5120
5237
  }
5121
5238
 
5122
- &> :where(a, button, label) {
5239
+ & > :where(a, button, label) {
5123
5240
  gap: var(--size-2);
5124
5241
  min-block-size: var(--size-7);
5125
5242
  padding: var(--size-1) var(--size-2);
5126
5243
  }
5127
5244
 
5128
5245
  /* Checkbox / Radio */
5129
- &>label {
5246
+ & > label {
5130
5247
  .ui-end {
5131
5248
  padding-inline-end: 0.125rem;
5132
5249
  }
@@ -5161,7 +5278,7 @@ Lists meant to be used stand-alone or as part of Select elements
5161
5278
  :where(li, option) {
5162
5279
  padding-inline: 0;
5163
5280
 
5164
- &> :where(a, button, label) {
5281
+ & > :where(a, button, label) {
5165
5282
  padding-inline: 0;
5166
5283
  }
5167
5284
  }
@@ -5195,9 +5312,9 @@ Lists meant to be used stand-alone or as part of Select elements
5195
5312
  min-block-size: auto;
5196
5313
  padding: 0;
5197
5314
 
5198
- &[aria-selected="true"]> :where(a, button, label),
5315
+ &[aria-selected="true"] > :where(a, button, label),
5199
5316
  &[aria-selected="true"],
5200
- &:has(> [aria-current="page"])> :where(a, button, label) {
5317
+ &:has(> [aria-current="page"]) > :where(a, button, label) {
5201
5318
  background-color: var(--_bg-color-hover);
5202
5319
  }
5203
5320
  }
@@ -5232,9 +5349,9 @@ Lists meant to be used stand-alone or as part of Select elements
5232
5349
  }
5233
5350
  }
5234
5351
 
5235
- &>a,
5236
- &>button,
5237
- &>label {
5352
+ & > a,
5353
+ & > button,
5354
+ & > label {
5238
5355
  align-items: center;
5239
5356
  background-color: var(--_bg-color);
5240
5357
  color: inherit;
@@ -5261,7 +5378,7 @@ Lists meant to be used stand-alone or as part of Select elements
5261
5378
  }
5262
5379
 
5263
5380
  /* Checkbox / Radio / Switch */
5264
- &>label {
5381
+ & > label {
5265
5382
  &:where(.ui-checkbox, .ui-radio, .ui-switch) {
5266
5383
  display: flex;
5267
5384
  }
@@ -5312,7 +5429,7 @@ Lists meant to be used stand-alone or as part of Select elements
5312
5429
  font-weight: 400;
5313
5430
  }
5314
5431
 
5315
- p+p {
5432
+ p + p {
5316
5433
  color: var(--text-muted);
5317
5434
  font-size: var(--font-size-0);
5318
5435
  }
@@ -5429,7 +5546,8 @@ Lists meant to be used stand-alone or as part of Select elements
5429
5546
 
5430
5547
  &[open] {
5431
5548
  opacity: 1;
5432
- transition: display 0.2s allow-discrete,
5549
+ transition:
5550
+ display 0.2s allow-discrete,
5433
5551
  overlay 0.2s allow-discrete,
5434
5552
  opacity 0.2s var(--ease-out-1);
5435
5553
 
@@ -5456,179 +5574,178 @@ Lists meant to be used stand-alone or as part of Select elements
5456
5574
  }
5457
5575
 
5458
5576
  @layer components.root {
5459
- :where(dialog.ui-drawer) {
5460
- --_backdrop-bg-color: transparent;
5461
- --_backdrop-blur: blur(2px);
5462
- --_bg-color: var(--surface-default);
5463
- --_block-size: min(80vb, 650px);
5464
- --_border-color: var(--border-color);
5465
- --_border-width: var(--border-width);
5466
- --_color: var(--text-primary);
5467
- --_content-padding: var(--size-4);
5468
- --_footer-gap: var(--size-3);
5469
- --_footer-padding: var(--size-3);
5470
- --_header-font-size: var(--font-size-3);
5471
- --_header-padding: var(--size-3);
5472
- --_inline-size: min(375px, 100vi);
5473
- --_shadow: var(--shadow-2);
5474
- --_transition-duration: 0.2s;
5475
- --_transition-timing: var(--ease-out-3);
5476
-
5477
- background-color: var(--_bg-color);
5478
- border: none;
5479
- box-shadow: var(--_shadow);
5480
- color: var(--_color);
5481
- display: flex;
5482
- flex-direction: column;
5483
- margin: 0;
5484
- max-inline-size: 100%;
5485
- padding: 0;
5486
- position: fixed;
5487
- transition:
5488
- display var(--_transition-duration) allow-discrete,
5489
- overlay var(--_transition-duration) allow-discrete,
5490
- translate var(--_transition-duration) var(--_transition-timing);
5491
- z-index: 1000;
5492
-
5493
- &::backdrop {
5494
- backdrop-filter: var(--_backdrop-blur);
5495
- background-color: var(--_backdrop-bg-color);
5496
- opacity: 0;
5497
- transition:
5498
- display var(--_transition-duration) allow-discrete,
5499
- overlay var(--_transition-duration) allow-discrete,
5500
- opacity var(--_transition-duration) var(--_transition-timing);
5501
- }
5502
-
5503
- &.ui-backdrop-transparent {
5504
- --_backdrop-blur: none;
5505
- }
5506
-
5507
- .ui-header {
5508
- align-items: center;
5509
- border-block-end: var(--_border-width) solid var(--_border-color);
5510
- display: flex;
5511
- padding: var(--_header-padding);
5512
-
5513
- :where(h1, h2, h3, h4, h5, h6) {
5514
- font-size: var(--_header-font-size);
5515
- margin: 0;
5516
- }
5517
-
5518
- :where(.ui-icon-button) {
5519
- margin-inline-start: auto;
5520
- }
5521
- }
5522
-
5523
- .ui-content {
5524
- flex: 1;
5525
- overflow-y: auto;
5526
- padding: var(--_content-padding);
5527
- }
5528
-
5529
- .ui-footer {
5530
- border-block-start: var(--_border-width) solid var(--_border-color);
5531
- display: flex;
5532
- gap: var(--_footer-gap);
5533
- justify-content: end;
5534
- padding: var(--_footer-padding);
5535
- }
5536
-
5537
- &.ui-inline-start,
5538
- &.ui-inline-end {
5539
- block-size: 100dvb;
5540
- inline-size: var(--_inline-size);
5541
- inset-block: 0;
5542
- max-block-size: 100%;
5543
- }
5544
-
5545
- &.ui-inline-start {
5546
- border-inline-end: var(--_border-width) solid var(--_border-color);
5547
- inset-inline-end: auto;
5548
- inset-inline-start: 0;
5549
- translate: -100% 0;
5550
- }
5551
-
5552
- &.ui-inline-end {
5553
- border-inline-start: var(--_border-width) solid var(--_border-color);
5554
- inset-inline-end: 0;
5555
- inset-inline-start: auto;
5556
- translate: 100% 0;
5557
-
5558
- .ui-footer {
5559
- justify-content: start;
5560
- }
5561
- }
5562
-
5563
- &.ui-block-start,
5564
- &.ui-block-end {
5565
- block-size: var(--_block-size);
5566
- inline-size: 100dvi;
5567
- inset-inline: 0;
5568
- max-block-size: 80dvb;
5569
- }
5570
-
5571
- &.ui-block-start {
5572
- border-block-end: var(--_border-width) solid var(--_border-color);
5573
- inset-block-end: auto;
5574
- inset-block-start: 0;
5575
- translate: 0 -100%;
5576
- }
5577
-
5578
- &.ui-block-end {
5579
- border-block-start: var(--_border-width) solid var(--_border-color);
5580
- inset-block-end: 0;
5581
- inset-block-start: auto;
5582
- translate: 0 100%;
5583
- }
5584
-
5585
- &[open] {
5586
- translate: 0 0;
5587
-
5588
- &::backdrop {
5589
- opacity: 1;
5590
- }
5591
-
5592
- @starting-style {
5593
- &::backdrop {
5594
- opacity: 0;
5595
- }
5596
-
5597
- &.ui-inline-start {
5598
- translate: -100% 0;
5599
- }
5600
-
5601
- &.ui-inline-end {
5602
- translate: 100% 0;
5603
- }
5604
-
5605
- &.ui-block-start {
5606
- translate: 0 -100%;
5607
- }
5608
-
5609
- &.ui-block-end {
5610
- translate: 0 100%;
5611
- }
5612
- }
5613
- }
5614
- }
5615
-
5616
- /* Scroll-lock is provided by the shared `.ui-scroll-lock` utility in core/utils.css.
5577
+ :where(dialog.ui-drawer) {
5578
+ --_backdrop-bg-color: transparent;
5579
+ --_backdrop-blur: blur(2px);
5580
+ --_bg-color: var(--surface-default);
5581
+ --_block-size: min(80vb, 650px);
5582
+ --_border-color: var(--border-color);
5583
+ --_border-width: var(--border-width);
5584
+ --_color: var(--text-primary);
5585
+ --_content-padding: var(--size-4);
5586
+ --_footer-gap: var(--size-3);
5587
+ --_footer-padding: var(--size-3);
5588
+ --_header-font-size: var(--font-size-3);
5589
+ --_header-padding: var(--size-3);
5590
+ --_inline-size: min(375px, 100vi);
5591
+ --_shadow: var(--shadow-2);
5592
+ --_transition-duration: 0.2s;
5593
+ --_transition-timing: var(--ease-out-3);
5594
+
5595
+ background-color: var(--_bg-color);
5596
+ border: none;
5597
+ box-shadow: var(--_shadow);
5598
+ color: var(--_color);
5599
+ display: flex;
5600
+ flex-direction: column;
5601
+ margin: 0;
5602
+ max-inline-size: 100%;
5603
+ padding: 0;
5604
+ position: fixed;
5605
+ transition:
5606
+ display var(--_transition-duration) allow-discrete,
5607
+ overlay var(--_transition-duration) allow-discrete,
5608
+ translate var(--_transition-duration) var(--_transition-timing);
5609
+ z-index: 1000;
5610
+
5611
+ &::backdrop {
5612
+ backdrop-filter: var(--_backdrop-blur);
5613
+ background-color: var(--_backdrop-bg-color);
5614
+ opacity: 0;
5615
+ transition:
5616
+ display var(--_transition-duration) allow-discrete,
5617
+ overlay var(--_transition-duration) allow-discrete,
5618
+ opacity var(--_transition-duration) var(--_transition-timing);
5619
+ }
5620
+
5621
+ &.ui-backdrop-transparent {
5622
+ --_backdrop-blur: none;
5623
+ }
5624
+
5625
+ .ui-header {
5626
+ align-items: center;
5627
+ border-block-end: var(--_border-width) solid var(--_border-color);
5628
+ display: flex;
5629
+ padding: var(--_header-padding);
5630
+
5631
+ :where(h1, h2, h3, h4, h5, h6) {
5632
+ font-size: var(--_header-font-size);
5633
+ margin: 0;
5634
+ }
5635
+
5636
+ :where(.ui-icon-button) {
5637
+ margin-inline-start: auto;
5638
+ }
5639
+ }
5640
+
5641
+ .ui-content {
5642
+ flex: 1;
5643
+ overflow-y: auto;
5644
+ padding: var(--_content-padding);
5645
+ }
5646
+
5647
+ .ui-footer {
5648
+ border-block-start: var(--_border-width) solid var(--_border-color);
5649
+ display: flex;
5650
+ gap: var(--_footer-gap);
5651
+ justify-content: end;
5652
+ padding: var(--_footer-padding);
5653
+ }
5654
+
5655
+ &.ui-inline-start,
5656
+ &.ui-inline-end {
5657
+ block-size: 100dvb;
5658
+ inline-size: var(--_inline-size);
5659
+ inset-block: 0;
5660
+ max-block-size: 100%;
5661
+ }
5662
+
5663
+ &.ui-inline-start {
5664
+ border-inline-end: var(--_border-width) solid var(--_border-color);
5665
+ inset-inline-end: auto;
5666
+ inset-inline-start: 0;
5667
+ translate: -100% 0;
5668
+ }
5669
+
5670
+ &.ui-inline-end {
5671
+ border-inline-start: var(--_border-width) solid var(--_border-color);
5672
+ inset-inline-end: 0;
5673
+ inset-inline-start: auto;
5674
+ translate: 100% 0;
5675
+
5676
+ .ui-footer {
5677
+ justify-content: start;
5678
+ }
5679
+ }
5680
+
5681
+ &.ui-block-start,
5682
+ &.ui-block-end {
5683
+ block-size: var(--_block-size);
5684
+ inline-size: 100dvi;
5685
+ inset-inline: 0;
5686
+ max-block-size: 80dvb;
5687
+ }
5688
+
5689
+ &.ui-block-start {
5690
+ border-block-end: var(--_border-width) solid var(--_border-color);
5691
+ inset-block-end: auto;
5692
+ inset-block-start: 0;
5693
+ translate: 0 -100%;
5694
+ }
5695
+
5696
+ &.ui-block-end {
5697
+ border-block-start: var(--_border-width) solid var(--_border-color);
5698
+ inset-block-end: 0;
5699
+ inset-block-start: auto;
5700
+ translate: 0 100%;
5701
+ }
5702
+
5703
+ &[open] {
5704
+ translate: 0 0;
5705
+
5706
+ &::backdrop {
5707
+ opacity: 1;
5708
+ }
5709
+
5710
+ @starting-style {
5711
+ &::backdrop {
5712
+ opacity: 0;
5713
+ }
5714
+
5715
+ &.ui-inline-start {
5716
+ translate: -100% 0;
5717
+ }
5718
+
5719
+ &.ui-inline-end {
5720
+ translate: 100% 0;
5721
+ }
5722
+
5723
+ &.ui-block-start {
5724
+ translate: 0 -100%;
5725
+ }
5726
+
5727
+ &.ui-block-end {
5728
+ translate: 0 100%;
5729
+ }
5730
+ }
5731
+ }
5732
+ }
5733
+
5734
+ /* Scroll-lock is provided by the shared `.ui-scroll-lock` utility in core/utils.css.
5617
5735
  This carve-out re-enables page scrolling when a transparent-backdrop drawer is
5618
5736
  open on wide viewports (where the drawer doesn't visually cover the page). */
5619
- html:has(dialog.ui-drawer.ui-scroll-lock[open].ui-backdrop-transparent) {
5620
- overflow: unset;
5621
- overscroll-behavior: auto;
5622
-
5623
- @media (width < 500px) {
5624
- overflow: clip;
5625
- overscroll-behavior: contain;
5626
- }
5627
- }
5737
+ html:has(dialog.ui-drawer.ui-scroll-lock[open].ui-backdrop-transparent) {
5738
+ overflow: unset;
5739
+ overscroll-behavior: auto;
5740
+
5741
+ @media (width < 500px) {
5742
+ overflow: clip;
5743
+ overscroll-behavior: contain;
5744
+ }
5745
+ }
5628
5746
  }
5629
5747
 
5630
5748
  @layer components.extended {
5631
-
5632
5749
  /* Form */
5633
5750
  :where(.ui-form) {
5634
5751
  display: grid;
@@ -5700,21 +5817,21 @@ Lists meant to be used stand-alone or as part of Select elements
5700
5817
  /* Error / validation */
5701
5818
  &[data-invalid] {
5702
5819
  :where(.ui-end-text) {
5703
- color: var(--primary);
5820
+ color: var(--critical);
5704
5821
  }
5705
5822
 
5706
5823
  :where(.ui-checkbox, .ui-radio, .ui-switch) {
5707
- --palette-source: oklch(0.58 0.21 var(--hue-red));
5824
+ --primary: var(--critical);
5708
5825
 
5709
5826
  :where(.ui-end-text) {
5710
- color: var(--primary);
5827
+ color: var(--critical);
5711
5828
  }
5712
5829
  }
5713
5830
 
5714
5831
  :where(.ui-switch) {
5715
5832
  input {
5716
5833
  border-radius: var(--radius-round);
5717
- outline: 2px solid var(--primary);
5834
+ outline: 2px solid var(--critical);
5718
5835
  }
5719
5836
  }
5720
5837
  }
@@ -5742,7 +5859,9 @@ Lists meant to be used stand-alone or as part of Select elements
5742
5859
  gap: var(--size-4);
5743
5860
 
5744
5861
  /* If it only has checkboxes, radios, or switches */
5745
- &:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)):not(:has(> :not(.ui-checkbox, .ui-radio, .ui-switch))) {
5862
+ &:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)):not(
5863
+ :has(> :not(.ui-checkbox, .ui-radio, .ui-switch))
5864
+ ) {
5746
5865
  gap: var(--size-2);
5747
5866
  }
5748
5867
 
@@ -5758,7 +5877,7 @@ Lists meant to be used stand-alone or as part of Select elements
5758
5877
  }
5759
5878
  }
5760
5879
 
5761
- &+& {
5880
+ & + & {
5762
5881
  margin-block-start: var(--size-5);
5763
5882
  }
5764
5883
 
@@ -5775,7 +5894,6 @@ Lists meant to be used stand-alone or as part of Select elements
5775
5894
  }
5776
5895
 
5777
5896
  @layer components.extended {
5778
-
5779
5897
  /*
5780
5898
  - Common styling for input, textarea and select
5781
5899
  - Form related styles such as: label, supporting text, error handling
@@ -5882,7 +6000,6 @@ Lists meant to be used stand-alone or as part of Select elements
5882
6000
 
5883
6001
  /* Textarea - keep affix aligned with the first line */
5884
6002
  &.ui-textarea .ui-field {
5885
-
5886
6003
  .ui-prefix,
5887
6004
  .ui-suffix {
5888
6005
  align-self: start;
@@ -5929,7 +6046,6 @@ Lists meant to be used stand-alone or as part of Select elements
5929
6046
  /* Variants */
5930
6047
  &.ui-filled {
5931
6048
  input {
5932
-
5933
6049
  &::-webkit-file-upload-button,
5934
6050
  &::file-selector-button {
5935
6051
  background-color: var(--surface-default);
@@ -5968,7 +6084,6 @@ Lists meant to be used stand-alone or as part of Select elements
5968
6084
  .ui-label {
5969
6085
  /* Make sure chevron is visible */
5970
6086
  inline-size: calc(100% - var(--size-6));
5971
-
5972
6087
  }
5973
6088
  }
5974
6089
 
@@ -5979,7 +6094,8 @@ Lists meant to be used stand-alone or as part of Select elements
5979
6094
 
5980
6095
  button {
5981
6096
  outline: 0;
5982
- padding: var(--_field-padding-block) var(--size-8) var(--_field-padding-block) var(--_field-padding-inline);
6097
+ padding: var(--_field-padding-block) var(--size-8)
6098
+ var(--_field-padding-block) var(--_field-padding-inline);
5983
6099
  }
5984
6100
  }
5985
6101
  }
@@ -5987,7 +6103,8 @@ Lists meant to be used stand-alone or as part of Select elements
5987
6103
  /* Non-customizable Select */
5988
6104
  &:has(select):not(:has(button)) {
5989
6105
  select {
5990
- padding: var(--_field-padding-block) var(--size-8) var(--_field-padding-block) var(--_field-padding-inline);
6106
+ padding: var(--_field-padding-block) var(--size-8)
6107
+ var(--_field-padding-block) var(--_field-padding-inline);
5991
6108
  }
5992
6109
  }
5993
6110
 
@@ -6085,11 +6202,12 @@ Lists meant to be used stand-alone or as part of Select elements
6085
6202
  --_bg-color: var(--surface-tonal);
6086
6203
 
6087
6204
  &:not(:has([disabled], :has(input[type="color"]))) {
6088
-
6089
6205
  /* Hover */
6090
6206
  &:hover {
6091
- --_bg-color: light-dark(oklch(from var(--surface-tonal) calc(l * 0.93) c h),
6092
- oklch(from var(--surface-tonal) calc(l * 1.1) c h));
6207
+ --_bg-color: light-dark(
6208
+ oklch(from var(--surface-tonal) calc(l * 0.93) c h),
6209
+ oklch(from var(--surface-tonal) calc(l * 1.1) c h)
6210
+ );
6093
6211
  }
6094
6212
  }
6095
6213
  }
@@ -6180,7 +6298,7 @@ Lists meant to be used stand-alone or as part of Select elements
6180
6298
  .ui-field:has(textarea) {
6181
6299
  grid-row: 1 / span 3;
6182
6300
 
6183
- +.ui-end-text {
6301
+ + .ui-end-text {
6184
6302
  grid-row: 4;
6185
6303
  }
6186
6304
  }
@@ -6265,8 +6383,11 @@ Lists meant to be used stand-alone or as part of Select elements
6265
6383
  }
6266
6384
 
6267
6385
  @media (prefers-reduced-motion: no-preference) {
6268
- transition: display 0.2s allow-discrete, opacity 0.2s var(--ease-3),
6269
- overlay 0.2s allow-discrete, scale 0.2s var(--ease-3);
6386
+ transition:
6387
+ display 0.2s allow-discrete,
6388
+ opacity 0.2s var(--ease-3),
6389
+ overlay 0.2s allow-discrete,
6390
+ scale 0.2s var(--ease-3);
6270
6391
  }
6271
6392
  }
6272
6393
 
@@ -6300,8 +6421,10 @@ Lists meant to be used stand-alone or as part of Select elements
6300
6421
  [role="group"] {
6301
6422
  label {
6302
6423
  background-color: light-dark(var(--gray-3), var(--gray-13));
6303
- color: light-dark(oklch(from var(--text-primary) calc(l * 0.75) c h),
6304
- oklch(from var(--text-primary) calc(l * 1.25) c h));
6424
+ color: light-dark(
6425
+ oklch(from var(--text-primary) calc(l * 0.75) c h),
6426
+ oklch(from var(--text-primary) calc(l * 1.25) c h)
6427
+ );
6305
6428
  font-weight: 500;
6306
6429
  overflow: hidden;
6307
6430
  padding-inline: var(--size-2);
@@ -6324,7 +6447,6 @@ Lists meant to be used stand-alone or as part of Select elements
6324
6447
 
6325
6448
  /* Option */
6326
6449
  option {
6327
-
6328
6450
  /* Checkmark */
6329
6451
  /* TODO - checkmark should be the final version of the checkmark API. Follow the development of this and remove redundant psuedo stuff. */
6330
6452
  &::check {
@@ -6347,7 +6469,6 @@ Lists meant to be used stand-alone or as part of Select elements
6347
6469
  }
6348
6470
 
6349
6471
  :where(.ui-select:has(select)) {
6350
-
6351
6472
  /* Size */
6352
6473
  &.ui-small {
6353
6474
  button {
@@ -6396,8 +6517,10 @@ Lists meant to be used stand-alone or as part of Select elements
6396
6517
  }
6397
6518
 
6398
6519
  @layer components.extended {
6399
-
6400
- :where(.ui-text-field:has( :where(input[type="date"],
6520
+ :where(
6521
+ .ui-text-field:has(
6522
+ :where(
6523
+ input[type="date"],
6401
6524
  input[type="datetime-local"],
6402
6525
  input[type="email"],
6403
6526
  input[type="month"],
@@ -6408,8 +6531,10 @@ Lists meant to be used stand-alone or as part of Select elements
6408
6531
  input[type="text"],
6409
6532
  input[type="time"],
6410
6533
  input[type="url"],
6411
- input[type="week"]))) {
6412
-
6534
+ input[type="week"]
6535
+ )
6536
+ )
6537
+ ) {
6413
6538
  /* Sizes */
6414
6539
  &.ui-small {
6415
6540
  input {
@@ -6465,7 +6590,9 @@ Lists meant to be used stand-alone or as part of Select elements
6465
6590
  textarea {
6466
6591
  block-size: auto;
6467
6592
  field-sizing: content;
6468
- min-block-size: calc(var(--_field-padding-block) * 2 + (var(--border-width) * 2) + 3lh);
6593
+ min-block-size: calc(
6594
+ var(--_field-padding-block) * 2 + (var(--border-width) * 2) + 3lh
6595
+ );
6469
6596
  resize: vertical;
6470
6597
  }
6471
6598
 
@@ -6486,77 +6613,79 @@ Lists meant to be used stand-alone or as part of Select elements
6486
6613
  }
6487
6614
 
6488
6615
  @layer components.extended {
6489
- :where(.ui-tooltip) {
6490
- --_tooltip-bg: light-dark(var(--gray-13), var(--gray-3));
6491
- --_tooltip-color: light-dark(var(--gray-1), var(--gray-15));
6492
- --_tooltip-offset: var(--size-2);
6493
-
6494
- &>.ui-anchor-floating {
6495
- background-color: var(--_tooltip-bg);
6496
- border-radius: var(--radius-2);
6497
- color: var(--_tooltip-color);
6498
- font-size: var(--font-size-05);
6499
- line-height: 1.3;
6500
- margin: var(--_tooltip-offset);
6501
- max-inline-size: 240px;
6502
- /* UA sets overflow: auto on [popover], which clips the arrow. */
6503
- overflow: visible;
6504
- padding-block: var(--size-1);
6505
- padding-inline: var(--size-2);
6506
- position-area: var(--anchor-position-area, block-start);
6507
- position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
6508
- position-visibility: anchors-visible;
6509
- text-align: center;
6510
- text-wrap: pretty;
6511
- }
6512
-
6513
- /* Optional arrow pointing from the tooltip toward the trigger.
6616
+ :where(.ui-tooltip) {
6617
+ --_tooltip-bg: light-dark(var(--gray-13), var(--gray-3));
6618
+ --_tooltip-color: light-dark(var(--gray-1), var(--gray-15));
6619
+ --_tooltip-offset: var(--size-2);
6620
+
6621
+ & > .ui-anchor-floating {
6622
+ background-color: var(--_tooltip-bg);
6623
+ border-radius: var(--radius-2);
6624
+ color: var(--_tooltip-color);
6625
+ font-size: var(--font-size-05);
6626
+ line-height: 1.3;
6627
+ margin: var(--_tooltip-offset);
6628
+ max-inline-size: 240px;
6629
+ /* UA sets overflow: auto on [popover], which clips the arrow. */
6630
+ overflow: visible;
6631
+ padding-block: var(--size-1);
6632
+ padding-inline: var(--size-2);
6633
+ position-area: var(--anchor-position-area, block-start);
6634
+ position-try-fallbacks:
6635
+ flip-block,
6636
+ flip-inline,
6637
+ flip-block flip-inline;
6638
+ position-visibility: anchors-visible;
6639
+ text-align: center;
6640
+ text-wrap: pretty;
6641
+ }
6642
+
6643
+ /* Optional arrow pointing from the tooltip toward the trigger.
6514
6644
  Anchored to the same --anchor so it flips together with the
6515
6645
  tooltip when position-try-fallbacks kicks in. */
6516
- &.ui-with-arrow {
6517
- --_arrow-size: var(--size-2);
6518
-
6519
- &>.ui-anchor-floating {
6520
- /* Reserve space so the arrow doesn't overlap the trigger. */
6521
- --_tooltip-offset: calc(var(--size-2) + var(--_arrow-size) / 2);
6522
- }
6523
-
6524
- &>.ui-anchor-floating::before {
6525
- background-color: var(--_tooltip-bg);
6526
- block-size: var(--_arrow-size);
6527
- content: "";
6528
- inline-size: var(--_arrow-size);
6529
- inset-block-end: calc(var(--_arrow-size) / -2);
6530
- inset-inline-start: 50%;
6531
- position: absolute;
6532
- rotate: 45deg;
6533
- translate: -50% 0;
6534
- }
6535
- }
6536
-
6537
- /* Fade */
6538
- &>.ui-anchor-floating[popover] {
6539
- opacity: 0;
6540
- transition:
6541
- display 0.15s allow-discrete,
6542
- opacity 0.15s var(--ease-out-1),
6543
- overlay 0.15s allow-discrete;
6544
-
6545
- &:popover-open {
6546
- opacity: 1;
6547
-
6548
- @starting-style {
6549
- opacity: 0;
6550
- }
6551
- }
6552
- }
6553
- }
6646
+ &.ui-with-arrow {
6647
+ --_arrow-size: var(--size-2);
6648
+
6649
+ & > .ui-anchor-floating {
6650
+ /* Reserve space so the arrow doesn't overlap the trigger. */
6651
+ --_tooltip-offset: calc(var(--size-2) + var(--_arrow-size) / 2);
6652
+ }
6653
+
6654
+ & > .ui-anchor-floating::before {
6655
+ background-color: var(--_tooltip-bg);
6656
+ block-size: var(--_arrow-size);
6657
+ content: "";
6658
+ inline-size: var(--_arrow-size);
6659
+ inset-block-end: calc(var(--_arrow-size) / -2);
6660
+ inset-inline-start: 50%;
6661
+ position: absolute;
6662
+ rotate: 45deg;
6663
+ translate: -50% 0;
6664
+ }
6665
+ }
6666
+
6667
+ /* Fade */
6668
+ & > .ui-anchor-floating[popover] {
6669
+ opacity: 0;
6670
+ transition:
6671
+ display 0.15s allow-discrete,
6672
+ opacity 0.15s var(--ease-out-1),
6673
+ overlay 0.15s allow-discrete;
6674
+
6675
+ &:popover-open {
6676
+ opacity: 1;
6677
+
6678
+ @starting-style {
6679
+ opacity: 0;
6680
+ }
6681
+ }
6682
+ }
6683
+ }
6554
6684
  }
6555
6685
 
6556
6686
  /* Utils */
6557
6687
 
6558
6688
  @layer utils {
6559
-
6560
6689
  /*
6561
6690
  Screen-reader only
6562
6691
  When you visibly want to hide an element but make it accessible for screen readers.
@@ -6616,7 +6745,8 @@ Add `.ui-scroll-lock` to any element that uses the [open] attribute (native <dia
6616
6745
  inset-inline-start: 50%;
6617
6746
  position: absolute;
6618
6747
  transform-origin: center center;
6619
- transform: translateX(calc(var(--isRTL) * 50%)) translateY(-50%) translateZ(-1px) scale(var(--thumb-scale));
6748
+ transform: translateX(calc(var(--isRTL) * 50%)) translateY(-50%)
6749
+ translateZ(-1px) scale(var(--thumb-scale));
6620
6750
  will-change: transform;
6621
6751
 
6622
6752
  @media (prefers-reduced-motion: no-preference) {