@oscarpalmer/oui 0.36.0 → 0.37.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 (51) hide show
  1. package/dist/css/badge.css +18 -15
  2. package/dist/css/button.css +35 -31
  3. package/dist/css/color.css +20 -20
  4. package/dist/css/combobox.css +133 -34
  5. package/dist/css/content.css +29 -10
  6. package/dist/css/floatable.css +10 -10
  7. package/dist/css/form.css +393 -129
  8. package/dist/css/listbox.css +41 -17
  9. package/dist/css/message.css +13 -10
  10. package/dist/css/reset.css +29 -88
  11. package/dist/css/splitter.css +2 -2
  12. package/dist/css/tabs.css +103 -0
  13. package/dist/js/focus-trap/focus-trap.embedded.mjs +6 -10
  14. package/dist/js/index.d.mts +2 -1
  15. package/dist/js/index.mjs +2 -1
  16. package/dist/js/internal/draggable.mjs +16 -22
  17. package/dist/js/internal/listbox/listbox.form.mjs +1 -1
  18. package/dist/js/internal/listbox/listbox.state.mjs +1 -1
  19. package/dist/js/internal/navigable.d.mts +11 -5
  20. package/dist/js/internal/navigable.mjs +44 -18
  21. package/dist/js/movable/movable.embedded.mjs +3 -6
  22. package/dist/js/resizable/resizable.embedded.mjs +16 -26
  23. package/dist/js/splitter.mjs +15 -12
  24. package/dist/js/tabs.d.mts +25 -0
  25. package/dist/js/tabs.mjs +240 -0
  26. package/dist/js/tooltip.mjs +13 -12
  27. package/package.json +1 -1
  28. package/src/css/badge.scss +6 -18
  29. package/src/css/button.scss +6 -45
  30. package/src/css/color.scss +20 -20
  31. package/src/css/combobox.scss +20 -51
  32. package/src/css/content.scss +30 -3
  33. package/src/css/floatable.scss +17 -17
  34. package/src/css/form.scss +84 -72
  35. package/src/css/listbox.scss +2 -31
  36. package/src/css/message.scss +13 -28
  37. package/src/css/mixins.scss +253 -28
  38. package/src/css/reset.scss +37 -86
  39. package/src/css/splitter.scss +2 -2
  40. package/src/css/tabs.scss +85 -0
  41. package/src/js/focus-trap/focus-trap.embedded.ts +11 -19
  42. package/src/js/index.ts +1 -0
  43. package/src/js/internal/draggable.ts +29 -33
  44. package/src/js/internal/listbox/listbox.form.ts +1 -1
  45. package/src/js/internal/listbox/listbox.state.ts +1 -1
  46. package/src/js/internal/navigable.ts +80 -23
  47. package/src/js/movable/movable.embedded.ts +11 -13
  48. package/src/js/resizable/resizable.embedded.ts +25 -39
  49. package/src/js/splitter.ts +21 -18
  50. package/src/js/tabs.ts +447 -0
  51. package/src/js/tooltip.ts +20 -17
@@ -32,33 +32,51 @@
32
32
  }
33
33
 
34
34
  :where([oui-listbox-filter-input]) {
35
- --oui-background-percentage: 0%;
36
- --oui-foreground-percentage: 0%;
37
35
  --oui-outline-percentage: 100%;
38
36
  --oui-outline-value: var(--oui-blue-6);
39
37
  outline: 4px solid color-mix(in oklab, var(--oui-outline-value), transparent var(--oui-outline-percentage));
40
38
  outline-offset: 0;
41
- transition: 0.125s ease-in-out;
39
+ --oui-background-percentage: 0%;
40
+ --oui-foreground-percentage: 0%;
42
41
  align-content: center;
43
42
  background-color: color-mix(in oklab, var(--oui-background-value), transparent var(--oui-background-percentage));
44
43
  border: 1px solid var(--oui-border-value, var(--oui-gray-3));
45
44
  box-shadow: inset 0 2px 4px -1px var(--oui-gray-3);
46
45
  color: color-mix(in oklab, var(--oui-foreground-value, inherit), transparent var(--oui-foreground-percentage));
47
46
  -webkit-text-fill-color: color-mix(in oklab, var(--oui-foreground-value, inherit), transparent var(--oui-foreground-percentage));
48
- --oui-background-value: var(--oui-absolute);
49
- width: 100%;
50
- padding: 0.5em 0.75em;
51
- border-radius: 0.25em;
52
- position: relative;
53
- }
54
- :where([oui-listbox-filter-input]:not([disabled], [readonly], [aria-disabled=true i]):focus) {
47
+ transition: 0.125s ease-in-out;
48
+ transition-property: background, outline, border, box-shadow, color;
49
+ }
50
+ :where([oui-listbox-filter-input]).oui-validate:not([disabled],
51
+ [readonly],
52
+ [aria-disabled=true i],
53
+ [aria-readonly=true i],
54
+ :focus-visible,
55
+ :focus-within):is(:user-invalid:not([aria-invalid=false i]), [aria-invalid=true i]) {
56
+ --oui-border-value: var(--oui-red-5);
57
+ --oui-foreground-value: var(--oui-red-9);
58
+ --oui-outline-percentage: 82.5%;
59
+ --oui-outline-value: var(--oui-red-6);
60
+ }
61
+ :where([oui-listbox-filter-input]).oui-validate:not([disabled],
62
+ [readonly],
63
+ [aria-disabled=true i],
64
+ [aria-readonly=true i],
65
+ :focus-visible,
66
+ :focus-within):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]) {
67
+ --oui-border-value: var(--oui-green-5);
68
+ --oui-foreground-value: var(--oui-green-9);
69
+ --oui-outline-percentage: 82.5%;
70
+ --oui-outline-value: var(--oui-green-6);
71
+ }
72
+ :where([oui-listbox-filter-input]):not([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]):focus-visible, :where([oui-listbox-filter-input]):not([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]):focus-within {
55
73
  --oui-border-value: var(--oui-blue-5);
56
74
  --oui-foreground-value: inherit;
57
75
  --oui-outline-percentage: 75%;
58
76
  --oui-outline-value: var(--oui-blue-6);
59
77
  }
60
78
  @media (hover: hover) {
61
- :where([oui-listbox-filter-input]:not([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]):hover) {
79
+ :where([oui-listbox-filter-input]):not([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]):hover {
62
80
  --oui-border-value: var(--oui-blue-4);
63
81
  --oui-foreground-percentage: 0%;
64
82
  --oui-foreground-value: inherit;
@@ -66,16 +84,23 @@
66
84
  --oui-outline-value: var(--oui-blue-6);
67
85
  }
68
86
  }
69
- :where([oui-listbox-filter-input]:is([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i])) {
87
+ :where([oui-listbox-filter-input]):is([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]) {
70
88
  --oui-foreground-percentage: 25%;
71
89
  font-style: italic;
72
90
  }
73
- :where([oui-listbox-filter-input]:is([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]):focus) {
91
+ :where([oui-listbox-filter-input]):is([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]):focus-visible {
74
92
  --oui-outline-percentage: 75%;
75
93
  }
76
- :where([oui-listbox-filter-input]:is([disabled], [aria-disabled=true i])) {
94
+ :where([oui-listbox-filter-input]):is([disabled], [aria-disabled=true i]) {
77
95
  --oui-background-percentage: 50%;
78
96
  }
97
+ :where([oui-listbox-filter-input]) {
98
+ --oui-background-value: var(--oui-absolute);
99
+ width: 100%;
100
+ padding: 0.5em 0.75em;
101
+ border-radius: 0.25em;
102
+ position: relative;
103
+ }
79
104
 
80
105
  :where([oui-listbox-header]) {
81
106
  padding: 0.5em 1em;
@@ -126,10 +151,9 @@
126
151
  outline-offset: -4px;
127
152
  line-height: 1.25;
128
153
  cursor: pointer;
129
- transition: 0.125s ease-in-out;
130
154
  }
131
155
  :where([oui-listbox-option][aria-selected=true i]) {
132
- background-color: var(--oui-blue-3);
156
+ background-color: var(--oui-blue-2);
133
157
  color: var(--oui-blue-9);
134
158
  }
135
159
  :where(oui-listbox[multiple] [oui-listbox-option][aria-selected=true i])::before {
@@ -137,7 +161,7 @@
137
161
  margin: 0 0.75em 0 0;
138
162
  }
139
163
  @media (hover: hover) {
140
- :where(:where(oui-listbox:not([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]) [oui-listbox-option]):hover) {
164
+ :where(oui-listbox:not([disabled], [readonly], [aria-disabled=true i], [aria-readonly=true i]) [oui-listbox-option]:hover) {
141
165
  background-color: var(--oui-blue-1);
142
166
  color: var(--oui-blue-8);
143
167
  }
@@ -1,6 +1,9 @@
1
1
  /*! https://github.com/oscarpalmer/oui */
2
2
 
3
3
  :where(.oui-message) {
4
+ --oui-background: var(--oui-gray-1);
5
+ --oui-border: var(--oui-gray-2);
6
+ --oui-foreground: var(--oui-gray-8);
4
7
  --oui-shadow-mixed: color-mix(
5
8
  in oklab,
6
9
  var(--oui-shadow-value, var(--oui-gray-6)),
@@ -8,25 +11,25 @@
8
11
  );
9
12
  box-shadow: inset 0 1px 0 0 transparent, 0 0 0 1px var(--oui-shadow-mixed), 0 1px 2px -0.5px var(--oui-shadow-mixed), 0 2px 4px -1px var(--oui-shadow-mixed);
10
13
  padding: 1em 1.25em;
11
- background-color: color-mix(in oklab, var(--oui-background, var(--oui-gray-0)), transparent 25%);
14
+ background-color: color-mix(in oklab, var(--oui-background), transparent 25%);
12
15
  border-radius: 0.5em;
13
16
  max-width: -moz-fit-content;
14
17
  max-width: fit-content;
15
18
  display: inline-flex;
16
19
  flex-flow: column nowrap;
17
20
  gap: 1em;
18
- color: var(--oui-foreground, var(--oui-gray-8));
21
+ color: var(--oui-foreground);
19
22
  line-height: 1.25;
20
23
  }
21
24
  :where(.oui-message h2, .oui-message h3, .oui-message h4, .oui-message h5, .oui-message h6) {
22
- color: var(--oui-foreground, var(--oui-gray-10));
25
+ color: var(--oui-foreground);
23
26
  font-size: 1em;
24
27
  font-weight: bold;
25
28
  }
26
29
  :where(.oui-message hr) {
27
30
  height: 1px;
28
31
  margin: 0 -1.25em;
29
- background-color: var(--oui-border, var(--oui-gray-2));
32
+ background-color: var(--oui-border);
30
33
  border: none;
31
34
  }
32
35
  :where(.oui-message p) {
@@ -37,37 +40,37 @@
37
40
  gap: 1em;
38
41
  }
39
42
  :where(.oui-message--blue, .oui-message--info) {
40
- --oui-background: var(--oui-blue-0);
43
+ --oui-background: var(--oui-blue-1);
41
44
  --oui-border: var(--oui-blue-2);
42
45
  --oui-foreground: var(--oui-blue-8);
43
46
  --oui-shadow-value: var(--oui-blue-6);
44
47
  }
45
48
  :where(.oui-message--green, .oui-message--success) {
46
- --oui-background: var(--oui-green-0);
49
+ --oui-background: var(--oui-green-1);
47
50
  --oui-border: var(--oui-green-2);
48
51
  --oui-foreground: var(--oui-green-8);
49
52
  --oui-shadow-value: var(--oui-green-6);
50
53
  }
51
54
  :where(.oui-message--orange, .oui-message--warning) {
52
- --oui-background: var(--oui-orange-0);
55
+ --oui-background: var(--oui-orange-1);
53
56
  --oui-border: var(--oui-orange-2);
54
57
  --oui-foreground: var(--oui-orange-8);
55
58
  --oui-shadow-value: var(--oui-orange-6);
56
59
  }
57
60
  :where(.oui-message--purple, .oui-message--special) {
58
- --oui-background: var(--oui-purple-0);
61
+ --oui-background: var(--oui-purple-1);
59
62
  --oui-border: var(--oui-purple-2);
60
63
  --oui-foreground: var(--oui-purple-8);
61
64
  --oui-shadow-value: var(--oui-purple-6);
62
65
  }
63
66
  :where(.oui-message--red, .oui-message--error) {
64
- --oui-background: var(--oui-red-0);
67
+ --oui-background: var(--oui-red-1);
65
68
  --oui-border: var(--oui-red-2);
66
69
  --oui-foreground: var(--oui-red-8);
67
70
  --oui-shadow-value: var(--oui-red-6);
68
71
  }
69
72
  :where(.oui-message--yellow, .oui-message--notice) {
70
- --oui-background: var(--oui-yellow-0);
73
+ --oui-background: var(--oui-yellow-1);
71
74
  --oui-border: var(--oui-yellow-2);
72
75
  --oui-foreground: var(--oui-yellow-8);
73
76
  --oui-shadow-value: var(--oui-yellow-6);
@@ -7,30 +7,28 @@
7
7
  * A reset I use for a lot of personal stuff, and elsewhere, of course.
8
8
  * It's a mix of a few different resets mixed together with some of my own ideas.
9
9
  *
10
- * When rules are explained, such comments will be suffixed with one ore more square brackets
11
- * with a two-letter code, all of which are listed below. My own code is "OP", which are my initials.
12
- *
13
- * - Andy Bell's "A (more) Modern CSS Reset" [AB]
10
+ * - Andy Bell's "A (more) Modern CSS Reset"
14
11
  * https://andy-bell.co.uk/a-more-modern-css-reset/
15
12
  *
16
- * - Chris Coyier's "The Coyier CSS Starter" [CC]
13
+ * - Chris Coyier's "The Coyier CSS Starter"
17
14
  * https://frontendmasters.com/blog/the-coyier-css-starter/
18
15
  *
19
- * - CSS Remedy [CR]
16
+ * - CSS Remedy
20
17
  * https://github.com/jensimmons/cssremedy
21
18
  *
22
- * - Harry Roberts [HR]
19
+ * - Harry Roberts
23
20
  * - https://github.com/csswizardry
24
21
  *
25
- * - RESS [RS]
22
+ * - Interface Cheat sheet
23
+ * - https://interfaces.dev/cheat-sheet
24
+ *
25
+ * - RESS
26
26
  * https://github.com/filipelinhares/ress
27
27
  *
28
- * - Sanitize.css [SE]
28
+ * - Sanitize.css
29
29
  * https://github.com/csstools/sanitize.css
30
30
  */
31
- /**
32
- * Catch-alls
33
- */
31
+ /* #region Globals*/
34
32
  :where(*) {
35
33
  padding: 0;
36
34
  margin: 0;
@@ -42,14 +40,12 @@
42
40
  box-sizing: border-box;
43
41
  }
44
42
 
45
- /**
46
- * Document
47
- */
43
+ /* #endregion*/
44
+ /* #region Document*/
48
45
  :where(:root) {
49
46
  font-family: system-ui, sans-serif;
50
47
  font-size: 100%;
51
48
  line-height: 1.5;
52
- /** Prevent text size inflation (e.g., after orientation change) [AB][RE][SE] */
53
49
  -webkit-text-size-adjust: none;
54
50
  -moz-text-size-adjust: none;
55
51
  text-size-adjust: none;
@@ -57,6 +53,8 @@
57
53
  -o-tab-size: 4;
58
54
  tab-size: 4;
59
55
  overflow-wrap: break-word;
56
+ -webkit-font-smoothing: antialiased;
57
+ -moz-osx-font-smoothing: grayscale;
60
58
  }
61
59
 
62
60
  :where(body) {
@@ -64,13 +62,13 @@
64
62
  font-size: 1rem;
65
63
  }
66
64
 
67
- /**
68
- * General
69
- */
65
+ /* #endregion*/
66
+ /* #region General*/
70
67
  :where(a) {
71
68
  -webkit-text-decoration-skip: ink;
72
69
  text-decoration-skip-ink: auto;
73
70
  text-underline-offset: 0.125em;
71
+ text-underline-position: from-font;
74
72
  }
75
73
 
76
74
  :where(abbr[title], dfn[title]) {
@@ -78,20 +76,16 @@
78
76
  }
79
77
 
80
78
  :where(abbr[title]) {
81
- /** Add the correct text decoration in Safari [RS][SE] */
82
79
  text-decoration: underline;
83
- /** Ditto */
84
80
  -webkit-text-decoration: underline dotted;
85
81
  text-decoration: underline dotted;
86
82
  }
87
83
 
88
84
  :where(b, strong) {
89
- /** Add the correct font weight in Chrome, Edge, and Safari [RS][SE], without compounding [HR] */
90
85
  font-weight: bold;
91
86
  }
92
87
 
93
88
  :where(button, h1, h2, h3, h4, h5, h6, input, label, legend) {
94
- /** Set shorter line heights on headings and interactive elements [AB] */
95
89
  line-height: 1.125;
96
90
  }
97
91
 
@@ -104,23 +98,18 @@ input[type=radio i],
104
98
  input[type=reset i],
105
99
  input[type=submit i],
106
100
  summary) {
107
- /** Correct the inability to style clickable types in iOS [HR][RS][SE] */
108
101
  -webkit-appearance: auto;
109
102
  -moz-appearance: auto;
110
103
  appearance: auto;
111
- /** Ditto */
112
104
  cursor: pointer;
113
105
  }
114
106
 
115
107
  :where(code, kbd, output, pre, samp) {
116
- /** Specify the font family of code elements [HR][RS][SE] */
117
108
  font-family: monospace, monospace;
118
- /** Correct the odd 'em' font sizing in all browsers [HR][RS][SE] */
119
109
  font-size: inherit;
120
110
  }
121
111
 
122
112
  :where(details > summary:first-of-type) {
123
- /** Add the correct display in Safari [SE] */
124
113
  display: list-item;
125
114
  }
126
115
 
@@ -143,7 +132,6 @@ summary) {
143
132
  }
144
133
 
145
134
  :where(dl, ol, ul) :where(dl, ol, ul) {
146
- /** Remove the margin on nested lists in Chrome, Edge, and Safari [SE] */
147
135
  margin: 0;
148
136
  }
149
137
 
@@ -152,23 +140,18 @@ summary) {
152
140
  }
153
141
 
154
142
  :where(h1) {
155
- /** Consistent sizing across browsers [HR] */
156
143
  font-size: 2em;
157
144
  }
158
145
 
159
146
  :where(hr) {
160
- /** Add the correct box sizing in Firefox [CR][RS][SE] */
161
147
  height: 0;
162
- /** Show the overflow in Edge and IE [CR][RS] */
163
148
  overflow: visible;
164
149
  border-style: solid;
165
150
  border-width: 1px 0 0;
166
- /** // Correct the inheritance of border colour in Firefox [CR][RS][SE] */
167
151
  color: inherit;
168
152
  }
169
153
 
170
154
  :where(ins, u) {
171
- /** Prevent link styling [HR] */
172
155
  text-decoration: none;
173
156
  }
174
157
 
@@ -179,15 +162,12 @@ summary) {
179
162
  }
180
163
 
181
164
  :where(nav li)::before {
182
- /** Prevent VoiceOver from ignoring list semantics in Safari [SE] */
183
165
  content: "​";
184
166
  float: left;
185
167
  }
186
168
 
187
169
  :where(pre) {
188
- /** Prevent overflow of the container in all browsers [SE] */
189
170
  overflow: auto;
190
- /** Overflow by default is bad… [CR] */
191
171
  white-space: pre-wrap;
192
172
  }
193
173
 
@@ -211,28 +191,20 @@ summary) {
211
191
 
212
192
  :where(table) {
213
193
  border-collapse: collapse;
214
- /** Correct table border colour in Chrome, Edge, and Safari [SE] */
215
194
  border-color: currentcolor;
216
- /** Modernized border spacing [HR] */
217
195
  border-spacing: 0;
218
- /** More legible numbers [HR] */
219
196
  font-variant-numeric: tabular-nums;
220
- /** Remove text indentation from table contents in Chrome, Edge, and Safari [RS][SE] */
221
197
  text-indent: 0;
222
198
  }
223
199
 
224
- /**
225
- * Form-related
226
- */
200
+ /* #endregion*/
201
+ /* #region Forms*/
227
202
  :where(button, input, optgroup, select, textarea) {
228
- /** Correct the font inheritance in Firefox, Edge, and Safari [HR][RS][SE] */
229
203
  font: inherit;
230
204
  }
231
205
 
232
206
  :where(button, input, select, textarea) {
233
- /** Change the inconsistent appearance in all browsers [SE] */
234
207
  padding: 0.25em 0.5em;
235
- /** Ditto for all */
236
208
  background-color: transparent;
237
209
  border: 1px solid WindowFrame;
238
210
  color: inherit;
@@ -240,26 +212,21 @@ summary) {
240
212
  }
241
213
 
242
214
  :where(fieldset) {
243
- /** Change the inconsistent appearance in all browsers [SE] */
244
215
  border: 1px solid darkgrey;
245
216
  }
246
217
 
247
218
  :where(optgroup) {
248
- /** Restore the font weight unset by previous rules [RS] */
249
219
  font-weight: bold;
250
220
  }
251
221
 
252
222
  :where(progress) {
253
- /** Add the correct vertical alignment in Chrome, Edge, and Firefox [RS][SE] */
254
223
  vertical-align: baseline;
255
224
  }
256
225
 
257
226
  :where(select, input[list]) {
258
- /** Change the inconsistent appearance in all browsers [SE] */
259
227
  -webkit-appearance: none;
260
228
  -moz-appearance: none;
261
229
  appearance: none;
262
- /** Ditto for all */
263
230
  padding-right: 1em;
264
231
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='4'%3E%3Cpath d='M4 0h6L7 4'/%3E%3C/svg%3E");
265
232
  background-position: right center/1em;
@@ -268,33 +235,26 @@ summary) {
268
235
  }
269
236
 
270
237
  :where(select[multiple]) {
271
- /** Don't show the arrow for multiple choice selects [SE] */
272
238
  background-image: none;
273
239
  }
274
240
 
275
241
  :where(textarea) {
276
- /** Change the resize direction in all browsers [RS][SE] */
277
242
  resize: vertical;
278
243
  }
279
244
 
280
245
  :where([type=color i], [type=range i]) {
281
- /** Remove the padding in all browsers [SE] */
282
246
  padding: 0;
283
- /** Remove the border in all browsers [SE] */
284
247
  border-width: 0;
285
248
  }
286
249
 
287
250
  :where([type=search i]) {
288
- /** Correct the odd appearance in Chrome, Edge, and Safari [RS][SE] */
289
251
  -webkit-appearance: textfield;
290
252
  -moz-appearance: textfield;
291
253
  appearance: textfield;
292
- /** Correct the outline style in Safari [RS][SE] */
293
254
  outline-offset: -2px;
294
255
  }
295
256
 
296
257
  ::file-selector-button {
297
- /** Correct the inability to style upload buttons in iOS and Safari [RS][SE] */
298
258
  -webkit-appearance: auto;
299
259
  -moz-appearance: auto;
300
260
  appearance: auto;
@@ -304,34 +264,27 @@ summary) {
304
264
  }
305
265
 
306
266
  ::-moz-placeholder {
307
- /** Better default text opacity [OP] */
308
267
  opacity: 0.67;
309
- /** Better default text color [HR][SE] */
310
268
  color: inherit;
311
269
  }
312
270
 
313
271
  ::placeholder {
314
- /** Better default text opacity [OP] */
315
272
  opacity: 0.67;
316
- /** Better default text color [HR][SE] */
317
273
  color: inherit;
318
274
  }
319
275
 
320
276
  ::-webkit-inner-spin-button,
321
277
  ::-webkit-outer-spin-button {
322
- /** Correct the cursor style of increment and decrement buttons in Safari [RS][SE] */
323
278
  height: auto;
324
279
  }
325
280
 
326
281
  ::-webkit-search-decoration {
327
- /** Remove the inner padding in Chrome, Edge, and Safari on macOS [SE] */
328
282
  -webkit-appearance: none;
329
283
  appearance: none;
330
284
  }
331
285
 
332
- /**
333
- * Media-related
334
- */
286
+ /* #endregion*/
287
+ /* #region Media*/
335
288
  :where(audio, canvas, embed, iframe, img, object, picture, svg, video) {
336
289
  max-inline-size: 100%;
337
290
  vertical-align: middle;
@@ -342,7 +295,6 @@ summary) {
342
295
  }
343
296
 
344
297
  :where(audio) {
345
- /** Better default width [CR] */
346
298
  width: 100%;
347
299
  }
348
300
 
@@ -351,7 +303,6 @@ summary) {
351
303
  }
352
304
 
353
305
  :where(canvas, img, svg, video) {
354
- /** Proportional height based on width [HR] */
355
306
  block-size: auto;
356
307
  }
357
308
 
@@ -360,21 +311,17 @@ summary) {
360
311
  }
361
312
 
362
313
  :where(img) {
363
- /** CSS magic! [HR] */
364
314
  background-repeat: no-repeat;
365
- /** Ditto */
366
315
  background-size: cover;
367
- /** Offset alt-text if image does not load [HR] */
316
+ outline: 1px solid light-dark(rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.08));
368
317
  font-style: italic;
369
318
  }
370
319
 
371
320
  :where(picture) {
372
- /** Remove the unnecessary wrapping 'picture', while maintaining contents [CR] */
373
321
  display: contents;
374
322
  }
375
323
 
376
324
  :where(source) {
377
- /** Source elements have nothing to display, so we hide them entirely [CR] */
378
325
  display: none;
379
326
  }
380
327
 
@@ -382,9 +329,8 @@ summary) {
382
329
  fill: currentcolor;
383
330
  }
384
331
 
385
- /**
386
- * Attributes
387
- */
332
+ /* #endregion*/
333
+ /* #region Attributes*/
388
334
  :where([aria-busy=true i]) {
389
335
  cursor: progress;
390
336
  }
@@ -413,32 +359,26 @@ summary) {
413
359
  display: inherit !important;
414
360
  }
415
361
 
416
- /**
417
- * Pseudo-classes
418
- */
362
+ /* #endregion*/
363
+ /* #region Pseudo-classes*/
419
364
  :where(:target) {
420
365
  scroll-margin: 2rlh;
421
366
  }
422
367
 
423
- /**
424
- * Media queries
425
- */
368
+ /* #endregion*/
369
+ /* #region Media queries*/
426
370
  @media (prefers-reduced-motion: no-preference) {
427
371
  :where(:root) {
428
- /** Allow for animations on auto-sizes [CC] */
429
372
  interpolate-size: allow-keywords;
430
373
  }
431
374
  :where(:root:focus-within) {
432
- /** Allow for smooth scrolling to focused elements */
433
375
  scroll-behavior: smooth;
434
376
  }
435
377
  }
436
378
  @media (prefers-reduced-motion: reduce) {
437
379
  :where(:root:focus-within) {
438
- /** Disable smooth scrolling, when requested */
439
380
  scroll-behavior: auto;
440
381
  }
441
- /** Disable animations and transitions, when requested */
442
382
  :where(*),
443
383
  ::after,
444
384
  ::before {
@@ -448,4 +388,5 @@ summary) {
448
388
  scroll-behavior: auto !important;
449
389
  }
450
390
  }
391
+ /* #endregion*/
451
392
 
@@ -19,7 +19,7 @@
19
19
  transition: background 0.125s ease-in-out;
20
20
  }
21
21
 
22
- :where([oui-splitter-separator]:has([oui-splitter-handle]:focus)),
22
+ :where([oui-splitter-separator]:has([oui-splitter-handle]:focus-visible)),
23
23
  :where([oui-splitter-separator]:has([oui-splitter-handle]:hover)),
24
24
  :where([oui-splitter-separator][oui-splitter-active]) {
25
25
  background-color: color-mix(in oklab, var(--oui-blue-6), transparent 82.5%);
@@ -49,7 +49,7 @@
49
49
  transition: background 0.125s ease-in-out, outline 0.125s ease-in-out;
50
50
  }
51
51
 
52
- :where([oui-splitter-handle]:focus)::after,
52
+ :where([oui-splitter-handle]:focus-visible)::after,
53
53
  :where([oui-splitter-handle]:hover)::after,
54
54
  :where([oui-splitter-handle][oui-splitter-active])::after {
55
55
  background-color: color-mix(in oklab, var(--oui-blue-6), transparent 50%);