@oscarpalmer/oui 0.9.0 → 0.11.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.
@@ -1,12 +1,18 @@
1
+ /*! https://github.com/oscarpalmer/oui */
1
2
  :where(.oui-message) {
3
+ --oui-shadow-value: color-mix(
4
+ in oklch,
5
+ var(--oui-shadow, var(--oui-gray-6)),
6
+ transparent 95%
7
+ );
2
8
  padding: 1em;
3
9
  display: inline-flex;
4
10
  flex-flow: column nowrap;
5
11
  gap: 1em;
6
- background-color: var(--background, var(--oui-gray-0));
7
- border: 1px solid var(--border, var(--oui-gray-2));
12
+ background-color: color-mix(in oklab, var(--oui-background, var(--oui-gray-0)), transparent 25%);
8
13
  border-radius: 0.5em;
9
- color: var(--foreground, var(--oui-gray-8));
14
+ box-shadow: 0 0 0 1px var(--oui-shadow-value), 0 1px 2px 0 var(--oui-shadow-value), 0 2px 4px 0 var(--oui-shadow-value);
15
+ color: var(--oui-foreground, var(--oui-gray-8));
10
16
  line-height: 1.25;
11
17
  }
12
18
  :where(.oui-message h2, .oui-message h3, .oui-message h4, .oui-message h5, .oui-message h6) {
@@ -16,7 +22,7 @@
16
22
  :where(.oui-message hr) {
17
23
  height: 1px;
18
24
  margin: 0 -1em;
19
- background-color: var(--border, var(--oui-gray-2));
25
+ background-color: var(--oui-shadow-value, var(--oui-gray-2));
20
26
  border: none;
21
27
  }
22
28
  :where(.oui-message p) {
@@ -25,32 +31,34 @@
25
31
  gap: 1em;
26
32
  }
27
33
  :where(.oui-message-blue, .oui-message-info) {
28
- --background: var(--oui-blue-0);
29
- --border: var(--oui-blue-2);
30
- --foreground: var(--oui-blue-8);
34
+ --oui-background: var(--oui-blue-0);
35
+ --oui-foreground: var(--oui-blue-8);
36
+ --oui-shadow: var(--oui-blue-6);
31
37
  }
32
38
  :where(.oui-message-green, .oui-message-success) {
33
- --background: var(--oui-green-0);
34
- --border: var(--oui-green-2);
35
- --foreground: var(--oui-green-8);
39
+ --oui-background: var(--oui-green-0);
40
+ --oui-foreground: var(--oui-green-8);
41
+ --oui-shadow: var(--oui-green-6);
36
42
  }
37
43
  :where(.oui-message-orange, .oui-message-warning) {
38
- --background: var(--oui-orange-0);
39
- --border: var(--oui-orange-2);
40
- --foreground: var(--oui-orange-8);
44
+ --oui-background: var(--oui-orange-0);
45
+ --oui-foreground: var(--oui-orange-8);
46
+ --oui-shadow: var(--oui-orange-6);
41
47
  }
42
48
  :where(.oui-message-purple, .oui-message-special) {
43
- --background: var(--oui-purple-0);
44
- --border: var(--oui-purple-2);
45
- --foreground: var(--oui-purple-8);
49
+ --oui-background: var(--oui-purple-0);
50
+ --oui-foreground: var(--oui-purple-8);
51
+ --oui-shadow: var(--oui-purple-6);
46
52
  }
47
53
  :where(.oui-message-red, .oui-message-error) {
48
- --background: var(--oui-red-0);
49
- --border: var(--oui-red-2);
50
- --foreground: var(--oui-red-8);
54
+ --oui-background: var(--oui-red-0);
55
+ --oui-foreground: var(--oui-red-8);
56
+ --oui-shadow: var(--oui-red-6);
51
57
  }
52
58
  :where(.oui-message-yellow, .oui-message-notice) {
53
- --background: var(--oui-yellow-0);
54
- --border: var(--oui-yellow-2);
55
- --foreground: var(--oui-yellow-8);
59
+ --oui-background: var(--oui-yellow-0);
60
+ --oui-foreground: var(--oui-yellow-8);
61
+ --oui-shadow: var(--oui-yellow-6);
56
62
  }
63
+
64
+
@@ -43,10 +43,11 @@
43
43
  font-family: system-ui, sans-serif;
44
44
  font-size: 100%;
45
45
  line-height: 1.5;
46
- -moz-text-size-adjust: none;
47
46
  -webkit-text-size-adjust: none;
48
- text-size-adjust: none;
47
+ -moz-text-size-adjust: none;
48
+ text-size-adjust: none; /* Prevent text size inflation (e.g., after orientation change) [AB][RE][SE]*/
49
49
  -moz-tab-size: 4;
50
+ -o-tab-size: 4;
50
51
  tab-size: 4;
51
52
  }
52
53
 
@@ -59,39 +60,43 @@
59
60
  * General
60
61
  */
61
62
  :where(a) {
63
+ -webkit-text-decoration-skip: ink;
62
64
  text-decoration-skip-ink: auto;
63
65
  text-underline-offset: 0.125em;
64
66
  }
65
67
 
66
68
  :where(abbr[title]) {
67
- text-decoration: underline;
68
- text-decoration: underline dotted;
69
+ text-decoration: underline; /* Add the correct text decoration in Safari [RS][SE]*/
70
+ -webkit-text-decoration: underline dotted;
71
+ text-decoration: underline dotted; /* ditto*/
69
72
  }
70
73
 
71
74
  :where(b, strong) {
72
- font-weight: bolder;
75
+ font-weight: bolder; /* Add the correct font weight in Chrome, Edge, and Safari [RS][SE]*/
73
76
  }
74
77
 
75
78
  :where(button, h1, h2, h3, h4, h5, h6, input, label, legend) {
76
- line-height: 1.125;
79
+ line-height: 1.125; /* Set shorter line heights on headings and interactive elements [AB]*/
77
80
  }
78
81
 
79
82
  :where(button, [type=button i], [type=reset i], [type=submit i]) {
80
83
  -webkit-appearance: button;
84
+ -moz-appearance: button;
85
+ appearance: button; /* Correct the inability to style clickable types in iOS [RS][SE]*/
81
86
  cursor: pointer;
82
87
  }
83
88
 
84
89
  :where(code, kbd, pre, samp) {
85
- font-family: monospace, monospace;
86
- font-size: 1em;
90
+ font-family: monospace, monospace; /* Specify the font family of code elements [RS][SE]*/
91
+ font-size: 1em; /* Correct the odd 'em' font sizing in all browsers [RS][SE]*/
87
92
  }
88
93
 
89
94
  :where(details > summary:first-of-type) {
90
- display: list-item;
95
+ display: list-item; /* Add the correct display in Safari [SE]*/
91
96
  }
92
97
 
93
98
  :where(dl, ol, ul) :where(dl, ol, ul) {
94
- margin: 0;
99
+ margin: 0; /* Remove the margin on nested lists in Chrome, Edge, and Safari [SE]*/
95
100
  }
96
101
 
97
102
  :where(h1, h2, h3, h4, h5, h6) {
@@ -99,11 +104,11 @@
99
104
  }
100
105
 
101
106
  :where(hr) {
102
- height: 0;
103
- overflow: visible;
107
+ height: 0; /* Add the correct box sizing in Firefox [CR][RS][SE]*/
108
+ overflow: visible; /* Show the overflow in Edge and IE [CR][RS]*/
104
109
  border-style: solid;
105
110
  border-width: 1px 0 0;
106
- color: inherit;
111
+ color: inherit; /* Correct the inheritance of border colour in Firefox [CR][RS][SE]*/
107
112
  }
108
113
 
109
114
  :where(nav) :where(ol, ul),
@@ -113,13 +118,13 @@
113
118
  }
114
119
 
115
120
  :where(nav li)::before {
116
- content: "​";
121
+ content: "​"; /* Prevent VoiceOver from ignoring list semantics in Safari [SE]*/
117
122
  float: left;
118
123
  }
119
124
 
120
125
  :where(pre) {
121
- overflow: auto;
122
- white-space: pre-wrap;
126
+ overflow: auto; /* Prevent overflow of the container in all browsers [SE]*/
127
+ white-space: pre-wrap; /* Overflow by default is bad… [CR]*/
123
128
  }
124
129
 
125
130
  :where(small) {
@@ -143,83 +148,92 @@
143
148
 
144
149
  :where(table) {
145
150
  border-collapse: collapse;
146
- border-color: currentColor;
147
- text-indent: 0;
151
+ border-color: currentColor; /* Correct table border colour in Chrome, Edge, and Safari [SE]*/
152
+ text-indent: 0; /* Remove text indentation from table contents in Chrome, Edge, and Safari [RS][SE]*/
148
153
  }
149
154
 
150
155
  /**
151
156
  * Form-related
152
157
  */
153
158
  :where(button, input, optgroup, select, textarea) {
154
- font: inherit;
159
+ font: inherit; /* Correct the font inheritance in Firefox, Edge, and Safari [RS][SE]*/
155
160
  }
156
161
 
157
162
  :where(button, input, select, textarea) {
158
- padding: 0.25em 0.5em;
159
- background-color: transparent;
160
- border: 1px solid WindowFrame;
161
- color: inherit;
162
- letter-spacing: inherit;
163
+ padding: 0.25em 0.5em; /* Change the inconsistent appearance in all browsers [SE]*/
164
+ background-color: transparent; /* ditto*/
165
+ border: 1px solid WindowFrame; /* ditto*/
166
+ color: inherit; /* ditto*/
167
+ letter-spacing: inherit; /* ditto*/
163
168
  }
164
169
 
165
170
  :where(fieldset) {
166
- border: 1px solid darkgrey;
171
+ border: 1px solid darkgrey; /* Change the inconsistent appearance in all browsers [SE]*/
167
172
  }
168
173
 
169
174
  :where(optgroup) {
170
- font-weight: bold;
175
+ font-weight: bold; /* Restore the font weight unset by previous rules [RS]*/
171
176
  }
172
177
 
173
178
  :where(progress) {
174
- vertical-align: baseline;
179
+ vertical-align: baseline; /* Add the correct vertical alignment in Chrome, Edge, and Firefox [RS][SE]*/
175
180
  }
176
181
 
177
- :where(select) {
178
- -moz-appearance: none;
182
+ :where(select, input[list]) {
179
183
  -webkit-appearance: none;
180
- appearance: none;
181
- padding-right: 1em;
182
- background: 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") no-repeat right center/1em;
183
- border-radius: 0;
184
+ -moz-appearance: none;
185
+ appearance: none; /* Change the inconsistent appearance in all browsers [SE]*/
186
+ padding-right: 1em; /* ditto*/
187
+ background: 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") no-repeat right center/1em; /* ditto*/
188
+ border-radius: 0; /* ditto*/
184
189
  }
185
190
 
186
191
  :where(select[multiple]) {
187
- background-image: none;
192
+ background-image: none; /* Don't show the arrow for multiple choice selects [SE]*/
188
193
  }
189
194
 
190
195
  :where(textarea) {
191
- resize: vertical;
196
+ resize: vertical; /* Change the resize direction in all browsers [RS][SE]*/
192
197
  }
193
198
 
194
199
  :where([type=color i], [type=range i]) {
195
- padding: 0;
196
- border-width: 0;
200
+ padding: 0; /* Remove the padding in all browsers [SE]*/
201
+ border-width: 0; /* Remove the border in all browsers [SE]*/
197
202
  }
198
203
 
199
204
  :where([type=search i]) {
200
205
  -webkit-appearance: textfield;
201
- outline-offset: -2px;
206
+ -moz-appearance: textfield;
207
+ appearance: textfield; /* Correct the odd appearance in Chrome, Edge, and Safari [RS][SE]*/
208
+ outline-offset: -2px; /* Correct the outline style in Safari [RS][SE]*/
202
209
  }
203
210
 
204
- ::-webkit-file-upload-button {
211
+ ::file-selector-button {
205
212
  -webkit-appearance: button;
213
+ -moz-appearance: button;
214
+ appearance: button; /* Correct the inability to style upload buttons in iOS and Safari [RS][SE]*/
206
215
  color: inherit;
207
216
  font: inherit;
208
217
  line-height: 1.25;
209
218
  }
210
219
 
211
- ::-webkit-inner-spin-button,
212
- ::-webkit-outer-spin-button {
213
- height: auto;
220
+ ::-moz-placeholder {
221
+ opacity: 0.54; /* Correct the text style of placeholders in Chrome, Edge, and Safari. [SE]*/
222
+ color: inherit; /* Correct the text style of placeholders in Chrome, Edge, and Safari. [SE]*/
214
223
  }
215
224
 
216
- ::-webkit-input-placeholder {
217
- opacity: 0.54;
218
- color: inherit;
225
+ ::placeholder {
226
+ opacity: 0.54; /* Correct the text style of placeholders in Chrome, Edge, and Safari. [SE]*/
227
+ color: inherit; /* Correct the text style of placeholders in Chrome, Edge, and Safari. [SE]*/
228
+ }
229
+
230
+ ::-webkit-inner-spin-button,
231
+ ::-webkit-outer-spin-button {
232
+ height: auto; /* Correct the cursor style of increment and decrement buttons in Safari [RS][SE]*/
219
233
  }
220
234
 
221
235
  ::-webkit-search-decoration {
222
- -webkit-appearance: none;
236
+ -webkit-appearance: none; /* Remove the inner padding in Chrome, Edge, and Safari on macOS [SE]*/
223
237
  }
224
238
 
225
239
  /**
@@ -235,7 +249,7 @@
235
249
  }
236
250
 
237
251
  :where(audio) {
238
- width: 100%;
252
+ width: 100%; /* Better default width [CR]*/
239
253
  }
240
254
 
241
255
  :where(audio:not([controls])) {
@@ -243,7 +257,7 @@
243
257
  }
244
258
 
245
259
  :where(canvas, img, svg, video) {
246
- height: auto;
260
+ height: auto; /* Maintain aspect ratios [CR]*/
247
261
  }
248
262
 
249
263
  :where(iframe) {
@@ -251,11 +265,11 @@
251
265
  }
252
266
 
253
267
  :where(picture) {
254
- display: contents;
268
+ display: contents; /* Remove the unnecessary wrapping 'picture', while maintaining contents [CR]*/
255
269
  }
256
270
 
257
271
  :where(source) {
258
- display: none;
272
+ display: none; /* Source elements have nothing to display, so we hide them entirely [CR]*/
259
273
  }
260
274
 
261
275
  :where(svg:not([fill])) {
@@ -280,3 +294,5 @@
280
294
  :where([aria-controls]) {
281
295
  cursor: pointer;
282
296
  }
297
+
298
+
@@ -1,3 +1,4 @@
1
+ /*! https://github.com/oscarpalmer/oui */
1
2
  :where(.oui-table) {
2
3
  width: 100%;
3
4
  }
@@ -22,7 +23,7 @@
22
23
  top: 0;
23
24
  z-index: 2;
24
25
  }
25
- :where(.oui-table tbody tr:nth-child(2n)) {
26
+ :where(.oui-table tbody tr:nth-of-type(2n)) {
26
27
  background-color: color-mix(in oklab, var(--oui-blue-0), transparent 67%);
27
28
  }
28
29
  :where(.oui-table th, .oui-table tfoot td) {
@@ -63,3 +64,5 @@
63
64
  :where(.oui-table tr th:last-child, .oui-table tr td:last-child) {
64
65
  border-right-width: 0;
65
66
  }
67
+
68
+
@@ -54,7 +54,7 @@ function onFocusOut() {
54
54
  if (inactive.size === 0) {
55
55
  return;
56
56
  }
57
- setTimeout(() => {
57
+ requestAnimationFrame(() => {
58
58
  const element = find.findAncestor(
59
59
  document.activeElement,
60
60
  `[${selector}]`
@@ -64,7 +64,7 @@ function onFocusOut() {
64
64
  focusTrap.activate();
65
65
  }
66
66
  }
67
- }, 0);
67
+ });
68
68
  }
69
69
  function onTab(event2) {
70
70
  var _a;
@@ -132,7 +132,7 @@ observer.observe(document, {
132
132
  childList: true,
133
133
  subtree: true
134
134
  });
135
- setTimeout(() => {
135
+ requestAnimationFrame(() => {
136
136
  addFocusTraps(document.querySelectorAll(`[${selector}]`));
137
137
  event.on(document, "focusout", onFocusOut, {
138
138
  capture: true
@@ -144,4 +144,4 @@ setTimeout(() => {
144
144
  event.on(document, "keydown", onEscape, {
145
145
  passive: false
146
146
  });
147
- }, 0);
147
+ });
@@ -53,7 +53,7 @@ function onFocusOut() {
53
53
  if (inactive.size === 0) {
54
54
  return;
55
55
  }
56
- setTimeout(() => {
56
+ requestAnimationFrame(() => {
57
57
  const element = findAncestor(
58
58
  document.activeElement,
59
59
  `[${selector}]`
@@ -63,7 +63,7 @@ function onFocusOut() {
63
63
  focusTrap.activate();
64
64
  }
65
65
  }
66
- }, 0);
66
+ });
67
67
  }
68
68
  function onTab(event) {
69
69
  var _a;
@@ -131,7 +131,7 @@ observer.observe(document, {
131
131
  childList: true,
132
132
  subtree: true
133
133
  });
134
- setTimeout(() => {
134
+ requestAnimationFrame(() => {
135
135
  addFocusTraps(document.querySelectorAll(`[${selector}]`));
136
136
  on(document, "focusout", onFocusOut, {
137
137
  capture: true
@@ -143,4 +143,4 @@ setTimeout(() => {
143
143
  on(document, "keydown", onEscape, {
144
144
  passive: false
145
145
  });
146
- }, 0);
146
+ });
package/package.json CHANGED
@@ -3,24 +3,30 @@
3
3
  "name": "Oscar Palmér",
4
4
  "url": "https://oscarpalmer.se"
5
5
  },
6
+ "dependencies": {
7
+ "@oscarpalmer/atoms": "^0.102",
8
+ "@oscarpalmer/toretto": "^0.20"
9
+ },
6
10
  "description": "Styles, components, and utilities for building websites and applications.",
7
11
  "devDependencies": {
8
12
  "@biomejs/biome": "^1.9",
9
- "@oscarpalmer/atoms": "^0.89.1",
10
- "@oscarpalmer/toretto": "^0.18",
11
13
  "@rollup/plugin-node-resolve": "^16",
12
14
  "@rollup/plugin-typescript": "^12.1",
13
- "@types/node": "^22.13",
14
- "@vitest/coverage-istanbul": "^3",
15
+ "@types/node": "^24",
16
+ "@vitest/coverage-istanbul": "^3.2",
17
+ "autoprefixer": "^10.4",
15
18
  "dts-bundle-generator": "^9.5",
16
19
  "glob": "^11",
17
- "happy-dom": "^17.4",
18
- "sass": "^1.86",
19
- "stylelint": "^16.17",
20
+ "jsdom": "^26.1",
21
+ "postcss-cli": "^11",
22
+ "postcss-input-range": "^6",
23
+ "postcss-scss": "^4",
24
+ "sass": "^1.89",
25
+ "stylelint": "^16.20",
20
26
  "tslib": "^2.8",
21
27
  "typescript": "^5.8",
22
- "vite": "^6.2",
23
- "vitest": "^3"
28
+ "vite": "^6.3",
29
+ "vitest": "^3.2"
24
30
  },
25
31
  "exports": {
26
32
  ".": {
@@ -65,16 +71,18 @@
65
71
  },
66
72
  "scripts": {
67
73
  "build": "npm run clean && npm run build:css && npm run build:js",
68
- "build:css": "npx sass ./src/css:./dist/css --no-source-map",
74
+ "build:css": "npm run build:postcss && npx sass ./postcss:./dist/css --no-source-map",
75
+ "build:postcss": "npx postcss ./src/css/*.scss -d ./postcss -u autoprefixer postcss-input-range --parser postcss-scss",
69
76
  "build:js": "npx vite build && npm run types",
70
77
  "clean": "rm -rf ./dist && rm -rf ./types && rm -f ./tsconfig.tsbuildinfo",
71
78
  "rollup": "npx rollup -c --watch",
72
79
  "test": "npx vitest --coverage",
73
80
  "types": "npx tsc && npx dts-bundle-generator --config ./dts.config.cts --silent",
74
81
  "watch:css": "npx sass ./src/css:./dist/css --no-source-map --watch",
82
+ "watch:postcss": "npx postcss ./src/css/*.scss -d ./postcss -u autoprefixer postcss-input-range --parser postcss-scss --watch",
75
83
  "watch:js": "npx vite build --watch"
76
84
  },
77
85
  "type": "module",
78
86
  "types": "types/index.d.cts",
79
- "version": "0.9.0"
87
+ "version": "0.11.0"
80
88
  }
@@ -1,12 +1,23 @@
1
+ /*! https://github.com/oscarpalmer/oui */
2
+
1
3
  .oui {
2
4
  :where(&-pill, &-tag) {
5
+ --oui-shadow-value: color-mix(
6
+ in oklch,
7
+ var(--oui-shadow, var(--oui-gray-6)),
8
+ transparent 95%
9
+ );
10
+
3
11
  display: inline-flex;
4
12
  flex-flow: row nowrap;
5
13
  gap: .5em;
6
- background-color: var(--background, var(--oui-gray-1));
7
- border: 1px solid var(--border, var(--oui-gray-3));
8
- color: var(--foreground, var(--oui-gray-8));
9
- line-height: 1.125;
14
+ background-color: color-mix(in oklab, var(--oui-background, var(--oui-gray-0)), transparent 25%);
15
+ box-shadow:
16
+ 0 0 0 1px var(--oui-shadow-value),
17
+ 0 1px 2px 0 var(--oui-shadow-value),
18
+ 0 2px 4px 0 var(--oui-shadow-value);
19
+ color: var(--oui-foreground, var(--oui-gray-8));
20
+ line-height: 1.25;
10
21
  }
11
22
 
12
23
  :where(&-pill) {
@@ -24,6 +35,7 @@
24
35
  }
25
36
 
26
37
  :where(&-pill-tiny, &-tag-tiny) {
38
+ color: color-mix(in oklab, var(--oui-foreground, var(--oui-gray-8)), transparent 12.5%);
27
39
  font-size: .75em;
28
40
  font-weight: bold;
29
41
  letter-spacing: .1em;
@@ -31,38 +43,38 @@
31
43
  }
32
44
 
33
45
  :where(&-pill-blue, &-tag-blue) {
34
- --background: var(--oui-blue-1);
35
- --border: var(--oui-blue-3);
36
- --foreground: var(--oui-blue-8);
46
+ --oui-background: var(--oui-blue-0);
47
+ --oui-foreground: var(--oui-blue-8);
48
+ --oui-shadow: var(--oui-blue-6);
37
49
  }
38
50
 
39
51
  :where(&-pill-green, &-tag-green) {
40
- --background: var(--oui-green-1);
41
- --border: var(--oui-green-3);
42
- --foreground: var(--oui-green-8);
52
+ --oui-background: var(--oui-green-0);
53
+ --oui-foreground: var(--oui-green-8);
54
+ --oui-shadow: var(--oui-green-6);
43
55
  }
44
56
 
45
57
  :where(&-pill-orange, &-tag-orange) {
46
- --background: var(--oui-orange-1);
47
- --border: var(--oui-orange-3);
48
- --foreground: var(--oui-orange-8);
58
+ --oui-background: var(--oui-orange-0);
59
+ --oui-foreground: var(--oui-orange-8);
60
+ --oui-shadow: var(--oui-orange-6);
49
61
  }
50
62
 
51
63
  :where(&-pill-purple, &-tag-purple) {
52
- --background: var(--oui-purple-1);
53
- --border: var(--oui-purple-3);
54
- --foreground: var(--oui-purple-8);
64
+ --oui-background: var(--oui-purple-0);
65
+ --oui-foreground: var(--oui-purple-8);
66
+ --oui-shadow: var(--oui-purple-6);
55
67
  }
56
68
 
57
69
  :where(&-pill-red, &-tag-red) {
58
- --background: var(--oui-red-1);
59
- --border: var(--oui-red-3);
60
- --foreground: var(--oui-red-8);
70
+ --oui-background: var(--oui-red-0);
71
+ --oui-foreground: var(--oui-red-8);
72
+ --oui-shadow: var(--oui-red-6);
61
73
  }
62
74
 
63
75
  :where(&-pill-yellow, &-tag-yellow) {
64
- --background: var(--oui-yellow-1);
65
- --border: var(--oui-yellow-3);
66
- --foreground: var(--oui-yellow-8);
76
+ --oui-background: var(--oui-yellow-0);
77
+ --oui-foreground: var(--oui-yellow-8);
78
+ --oui-shadow: var(--oui-yellow-6);
67
79
  }
68
80
  }
@@ -0,0 +1,90 @@
1
+ @use './mixins' as mixins;
2
+
3
+ .oui-button {
4
+ :where(&) {
5
+ @include mixins.button;
6
+ }
7
+
8
+ :where(&-blue) {
9
+ --oui-background-value: var(--oui-blue-2);
10
+ --oui-foreground-value: var(--oui-blue-8);
11
+ --oui-outline-value: var(--oui-blue-6);
12
+ }
13
+
14
+ :where(&-green) {
15
+ --oui-background-value: var(--oui-green-2);
16
+ --oui-foreground-value: var(--oui-green-8);
17
+ --oui-outline-value: var(--oui-green-6);
18
+ }
19
+
20
+ :where(&-orange) {
21
+ --oui-background-value: var(--oui-orange-2);
22
+ --oui-foreground-value: var(--oui-orange-8);
23
+ --oui-outline-value: var(--oui-orange-6);
24
+ }
25
+
26
+ :where(&-purple) {
27
+ --oui-background-value: var(--oui-purple-2);
28
+ --oui-foreground-value: var(--oui-purple-8);
29
+ --oui-outline-value: var(--oui-purple-6);
30
+ }
31
+
32
+ :where(&-red) {
33
+ --oui-background-value: var(--oui-red-2);
34
+ --oui-foreground-value: var(--oui-red-8);
35
+ --oui-outline-value: var(--oui-red-6);
36
+ }
37
+
38
+ :where(&-yellow) {
39
+ --oui-background-value: var(--oui-yellow-2);
40
+ --oui-foreground-value: var(--oui-yellow-8);
41
+ --oui-outline-value: var(--oui-yellow-6);
42
+ }
43
+
44
+ :where(&-rounded) {
45
+ padding: 0.5em 1em;
46
+ flex-wrap: nowrap;
47
+ border-radius: 5em;
48
+ white-space: nowrap;
49
+ }
50
+
51
+ :where(&-small) {
52
+ font-size: 0.875em;
53
+ }
54
+
55
+ :where(&-tiny) {
56
+ --oui-foreground-percentage: 12.5%;
57
+
58
+ font-size: 0.75em;
59
+ font-weight: bold;
60
+ letter-spacing: 0.1em;
61
+ text-transform: uppercase;
62
+ }
63
+
64
+ :where(&:focus-visible) {
65
+ --oui-outline-percentage: 75%;
66
+ }
67
+
68
+ @media (hover: hover) {
69
+ :where(&:not([disabled], [aria-disabled='true' i]):hover) {
70
+ --oui-background-percentage: 50%;
71
+ --oui-foreground-percentage: 25%;
72
+ --oui-shadow-percentage: 90%;
73
+ }
74
+ }
75
+
76
+ :where(&:not([disabled], [aria-disabled='true' i]):active) {
77
+ box-shadow:
78
+ 0 0 0 1px var(--oui-shadow-mixed),
79
+ inset 0 1px 2px 0 var(--oui-shadow-mixed),
80
+ inset 0 2px 4px 0 var(--oui-shadow-mixed);
81
+ }
82
+
83
+ :where(&[disabled], &[aria-disabled='true' i]) {
84
+ --oui-background-percentage: 80%;
85
+ --oui-foreground-percentage: 20%;
86
+ --oui-shadow-percentage: 95%;
87
+
88
+ font-style: italic;
89
+ }
90
+ }