@shift-css/core 0.5.0 → 0.7.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.
package/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  A zero-runtime, OKLCH-native CSS framework with automatic theming.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@shift-css/core)](https://www.npmjs.com/package/@shift-css/core)
6
+ [![gzip size](https://img.shields.io/badge/gzip-~12KB-blue)](https://www.npmjs.com/package/@shift-css/core)
6
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
8
 
8
9
  ## Installation
@@ -78,9 +79,9 @@ Import only what you need:
78
79
 
79
80
  | File | Size |
80
81
  | --------------- | ------ |
81
- | `shift.css` | ~55 KB |
82
- | `shift.min.css` | ~41 KB |
83
- | Gzipped | ~10 KB |
82
+ | `shift.css` | ~83 KB |
83
+ | `shift.min.css` | ~64 KB |
84
+ | Gzipped | ~12 KB |
84
85
 
85
86
  ## Browser Support
86
87
 
@@ -0,0 +1,162 @@
1
+ :where([s-badge]) {
2
+ --_badge-bg: var(--s-neutral-200);
3
+ --_badge-text: var(--s-text-primary);
4
+ justify-content: center;
5
+ align-items: center;
6
+ gap: var(--s-space-1);
7
+ padding: var(--s-space-1) var(--s-space-2);
8
+ border-radius: var(--s-radius-sm);
9
+ font-weight: var(--s-font-medium);
10
+ font-size: var(--s-text-xs);
11
+ white-space: nowrap;
12
+ vertical-align: middle;
13
+ background-color: var(--_badge-bg);
14
+ color: var(--_badge-text);
15
+ line-height: 1.25;
16
+ display: inline-flex;
17
+
18
+ @supports (color: oklch(from red l c h)) {
19
+ color: oklch(from var(--_badge-bg) clamp(.15, calc((.55 - l) * 1000 + .15), .95) 0 0);
20
+ }
21
+
22
+ @supports (color: contrast-color(red)) {
23
+ color: contrast-color(var(--_badge-bg));
24
+ }
25
+ }
26
+
27
+ [s-badge="primary"] {
28
+ --_badge-bg: var(--s-primary-700);
29
+ background-color: var(--s-primary-700);
30
+ color: #fff;
31
+ }
32
+
33
+ [s-badge="secondary"] {
34
+ --_badge-bg: var(--s-neutral-700);
35
+ background-color: var(--s-neutral-700);
36
+ color: #fff;
37
+ }
38
+
39
+ [s-badge="success"] {
40
+ --_badge-bg: var(--s-success-700);
41
+ background-color: var(--s-success-700);
42
+ color: #fff;
43
+ }
44
+
45
+ [s-badge="warning"] {
46
+ --_badge-bg: var(--s-warning-400);
47
+ background-color: var(--s-warning-400);
48
+ color: var(--s-warning-950);
49
+ }
50
+
51
+ [s-badge="danger"] {
52
+ --_badge-bg: var(--s-danger-700);
53
+ background-color: var(--s-danger-700);
54
+ color: #fff;
55
+ }
56
+
57
+ [s-badge="accent"] {
58
+ --_badge-bg: var(--s-accent-700);
59
+ background-color: var(--s-accent-700);
60
+ color: #fff;
61
+ }
62
+
63
+ [s-badge="outline"] {
64
+ --_badge-bg: transparent;
65
+ color: var(--s-text-primary);
66
+ box-shadow: inset 0 0 0 1px var(--s-border-default);
67
+ background-color: #0000;
68
+ }
69
+
70
+ [s-badge="outline-primary"] {
71
+ --_badge-bg: transparent;
72
+ background-color: oklch(from var(--s-primary-500) l c h / .1);
73
+ color: light-dark(var(--s-primary-700), var(--s-primary-300));
74
+ box-shadow: inset 0 0 0 1px light-dark(var(--s-primary-500), var(--s-primary-400));
75
+ }
76
+
77
+ [s-badge="outline-success"] {
78
+ --_badge-bg: transparent;
79
+ background-color: oklch(from var(--s-success-500) l c h / .1);
80
+ color: light-dark(var(--s-success-700), var(--s-success-300));
81
+ box-shadow: inset 0 0 0 1px light-dark(var(--s-success-500), var(--s-success-400));
82
+ }
83
+
84
+ [s-badge="outline-warning"] {
85
+ --_badge-bg: transparent;
86
+ background-color: oklch(from var(--s-warning-500) l c h / .1);
87
+ color: light-dark(var(--s-warning-800), var(--s-warning-300));
88
+ box-shadow: inset 0 0 0 1px light-dark(var(--s-warning-500), var(--s-warning-400));
89
+ }
90
+
91
+ [s-badge="outline-danger"] {
92
+ --_badge-bg: transparent;
93
+ background-color: oklch(from var(--s-danger-500) l c h / .1);
94
+ color: light-dark(var(--s-danger-800), var(--s-danger-300));
95
+ box-shadow: inset 0 0 0 1px light-dark(var(--s-danger-500), var(--s-danger-400));
96
+ }
97
+
98
+ [s-badge][s-size="sm"] {
99
+ padding: .125rem .375rem;
100
+ font-size: .625rem;
101
+ }
102
+
103
+ [s-badge][s-size="lg"] {
104
+ padding: var(--s-space-2) var(--s-space-4);
105
+ font-size: var(--s-text-sm);
106
+ }
107
+
108
+ [s-badge][s-pill] {
109
+ border-radius: var(--s-radius-full);
110
+ }
111
+
112
+ [s-badge][s-dot] {
113
+ border-radius: var(--s-radius-full);
114
+ width: .5rem;
115
+ height: .5rem;
116
+ padding: 0;
117
+ }
118
+
119
+ [s-badge][s-dot][s-size="sm"] {
120
+ width: .375rem;
121
+ height: .375rem;
122
+ }
123
+
124
+ [s-badge][s-dot][s-size="lg"] {
125
+ width: .75rem;
126
+ height: .75rem;
127
+ }
128
+
129
+ @media (forced-colors: active) {
130
+ [s-badge] {
131
+ border: 1px solid canvastext;
132
+ }
133
+ }
134
+
135
+ @supports (container-type: inline-size) {
136
+ @container surface style(--_surface-depth: 1) {
137
+ :where([s-badge=""]) {
138
+ --_badge-bg: var(--s-neutral-300);
139
+ }
140
+
141
+ :where([s-badge="outline"]) {
142
+ box-shadow: inset 0 0 0 1px var(--s-border-strong);
143
+ }
144
+ }
145
+
146
+ @container surface style(--_surface-depth: 2) {
147
+ :where([s-badge=""]) {
148
+ --_badge-bg: var(--s-neutral-300);
149
+ box-shadow: var(--s-shadow-sm);
150
+ }
151
+
152
+ :where([s-badge="outline"]) {
153
+ box-shadow: inset 0 0 0 1px var(--s-border-strong);
154
+ }
155
+ }
156
+
157
+ @container surface style(--_surface-depth: -1) {
158
+ :where([s-badge=""]) {
159
+ --_badge-bg: var(--s-neutral-100);
160
+ }
161
+ }
162
+ }
@@ -24,16 +24,27 @@
24
24
  color: contrast-color(var(--_btn-bg));
25
25
  }
26
26
 
27
- transition: background-color var(--s-duration-150) var(--s-ease-out), border-color var(--s-duration-150) var(--s-ease-out), transform var(--s-duration-100) var(--s-ease-out);
27
+ transition: background-color var(--s-duration-150) var(--s-ease-out),
28
+ border-color var(--s-duration-150) var(--s-ease-out),
29
+ transform var(--s-duration-100) var(--s-ease-out);
28
30
  cursor: pointer;
29
31
  user-select: none;
30
32
 
31
33
  &:hover:not(:disabled) {
32
- --_btn-bg: var(--s-interactive-primary-hover);
34
+ background-color: var(--s-interactive-primary-hover);
35
+
36
+ @supports (color: oklch(from red l c h)) and (color: light-dark(red, blue)) {
37
+ background-color: light-dark(oklch(from var(--_btn-bg) calc(l * .92) c h), oklch(from var(--_btn-bg) min(calc(l * 1.1), .95) c h));
38
+ }
33
39
  }
34
40
 
35
41
  &:active:not(:disabled) {
36
- --_btn-bg: var(--s-interactive-primary-active);
42
+ background-color: var(--s-interactive-primary-active);
43
+
44
+ @supports (color: oklch(from red l c h)) and (color: light-dark(red, blue)) {
45
+ background-color: light-dark(oklch(from var(--_btn-bg) calc(l * .85) c h), oklch(from var(--_btn-bg) min(calc(l * 1.2), .98) c h));
46
+ }
47
+
37
48
  transform: scale(.98);
38
49
  }
39
50
 
@@ -52,14 +63,6 @@
52
63
  [s-btn="primary"] {
53
64
  --_btn-bg: var(--s-interactive-primary);
54
65
  --_btn-text: var(--s-text-inverse);
55
-
56
- &:hover:not(:disabled) {
57
- --_btn-bg: var(--s-interactive-primary-hover);
58
- }
59
-
60
- &:active:not(:disabled) {
61
- --_btn-bg: var(--s-interactive-primary-active);
62
- }
63
66
  }
64
67
 
65
68
  [s-btn="secondary"] {
@@ -67,10 +70,6 @@
67
70
  --_btn-text: var(--s-text-primary);
68
71
  --_btn-border: var(--s-border-default);
69
72
  color: var(--_btn-text);
70
-
71
- &:hover:not(:disabled) {
72
- --_btn-bg: var(--s-surface-sunken);
73
- }
74
73
  }
75
74
 
76
75
  [s-btn="ghost"] {
@@ -105,45 +104,21 @@
105
104
 
106
105
  &:hover:not(:disabled) {
107
106
  --_btn-bg: var(--s-interactive-primary);
108
- --_btn-text: var(--s-text-inverse);
109
- color: var(--_btn-text);
107
+ background-color: var(--s-interactive-primary);
108
+ color: var(--s-text-inverse);
110
109
  }
111
110
  }
112
111
 
113
112
  [s-btn="danger"] {
114
113
  --_btn-bg: var(--s-state-danger);
115
-
116
- &:hover:not(:disabled) {
117
- --_btn-bg: var(--s-danger-800);
118
- }
119
-
120
- &:active:not(:disabled) {
121
- --_btn-bg: var(--s-danger-900);
122
- }
123
114
  }
124
115
 
125
116
  [s-btn="success"] {
126
117
  --_btn-bg: var(--s-state-success);
127
-
128
- &:hover:not(:disabled) {
129
- --_btn-bg: var(--s-success-800);
130
- }
131
-
132
- &:active:not(:disabled) {
133
- --_btn-bg: var(--s-success-900);
134
- }
135
118
  }
136
119
 
137
120
  [s-btn="warning"] {
138
121
  --_btn-bg: var(--s-state-warning);
139
-
140
- &:hover:not(:disabled) {
141
- --_btn-bg: var(--s-warning-800);
142
- }
143
-
144
- &:active:not(:disabled) {
145
- --_btn-bg: var(--s-warning-900);
146
- }
147
122
  }
148
123
 
149
124
  [s-btn][s-size="sm"] {
@@ -214,3 +189,28 @@
214
189
  }
215
190
  }
216
191
  }
192
+
193
+ @supports (container-type: inline-size) {
194
+ @container surface style(--_surface-depth: 1) {
195
+ :where([s-btn="secondary"]) {
196
+ --_btn-border: var(--s-border-strong);
197
+ }
198
+ }
199
+
200
+ @container surface style(--_surface-depth: 2) {
201
+ :where([s-btn="secondary"]) {
202
+ --_btn-border: var(--s-border-strong);
203
+ --_btn-bg: var(--s-surface-base);
204
+ }
205
+
206
+ :where([s-btn="ghost"]) {
207
+ --_btn-border: var(--s-border-muted);
208
+ }
209
+ }
210
+
211
+ @container surface style(--_surface-depth: -1) {
212
+ :where([s-btn="secondary"]) {
213
+ --_btn-bg: var(--s-surface-base);
214
+ }
215
+ }
216
+ }
@@ -57,6 +57,12 @@
57
57
  color: var(--s-text-secondary);
58
58
  }
59
59
 
60
+ [s-card-actions] {
61
+ gap: var(--s-space-2);
62
+ margin-top: var(--s-space-4);
63
+ display: flex;
64
+ }
65
+
60
66
  [s-card="flat"] {
61
67
  --_card-shadow: none;
62
68
  --_card-border: var(--s-border-default);
@@ -64,12 +70,12 @@
64
70
 
65
71
  [s-card="elevated"], [s-card][s-surface="raised"] {
66
72
  --_card-shadow: var(--s-shadow-lg);
67
- --_card-border: transparent;
73
+ --_card-border: oklch(0% 0 0 / 0);
68
74
  }
69
75
 
70
76
  [s-card][s-surface="floating"] {
71
77
  --_card-shadow: var(--s-shadow-xl);
72
- --_card-border: transparent;
78
+ --_card-border: oklch(0% 0 0 / 0);
73
79
  }
74
80
 
75
81
  [s-card="outline"] {
@@ -80,11 +86,17 @@
80
86
 
81
87
  [s-card][s-interactive] {
82
88
  cursor: pointer;
83
- transition: transform var(--s-duration-200) var(--s-ease-out), box-shadow var(--s-duration-200) var(--s-ease-out);
89
+ transition: transform var(--s-duration-200) var(--s-ease-out),
90
+ box-shadow var(--s-duration-200) var(--s-ease-out),
91
+ border-color var(--s-duration-200) var(--s-ease-out);
84
92
 
85
93
  &:hover {
86
94
  --_card-shadow: var(--s-shadow-xl);
87
95
  transform: translateY(-4px);
96
+
97
+ @supports (color: oklch(from red l c h)) {
98
+ border-color: oklch(from var(--_card-border) max(calc(l - .1), .05) c h);
99
+ }
88
100
  }
89
101
 
90
102
  &:active {
@@ -158,3 +170,50 @@
158
170
  flex-direction: column;
159
171
  display: flex;
160
172
  }
173
+
174
+ @supports (container-type: inline-size) {
175
+ @container surface style(--_surface-depth: 1) {
176
+ :where([s-card]) {
177
+ --_card-shadow: var(--s-shadow-sm);
178
+ }
179
+ }
180
+
181
+ @container surface style(--_surface-depth: 2) {
182
+ :where([s-card]) {
183
+ --_card-shadow: none;
184
+ --_card-border: var(--s-border-default);
185
+ }
186
+ }
187
+
188
+ @container surface style(--_surface-depth: -1) {
189
+ :where([s-card]) {
190
+ --_card-shadow: var(--s-shadow-md);
191
+ }
192
+ }
193
+ }
194
+
195
+ @supports selector(:scope) {
196
+ @scope ([s-card]) to ([s-card]) {
197
+ [s-card-header] {
198
+ border-bottom: 1px solid var(--_card-border, var(--s-border-muted));
199
+ }
200
+
201
+ [s-card-footer] {
202
+ border-top: 1px solid var(--_card-border, var(--s-border-muted));
203
+ }
204
+
205
+ [s-card-title] {
206
+ color: inherit;
207
+ }
208
+
209
+ [s-card-subtitle] {
210
+ color: var(--s-text-secondary);
211
+ }
212
+
213
+ [s-card-actions] {
214
+ gap: var(--s-space-2);
215
+ margin-top: var(--s-space-4);
216
+ display: flex;
217
+ }
218
+ }
219
+ }
@@ -13,7 +13,8 @@
13
13
  color: var(--_input-text);
14
14
  font-size: var(--s-text-sm);
15
15
  line-height: var(--s-leading-normal);
16
- transition: border-color var(--s-duration-150) var(--s-ease-out), box-shadow var(--s-duration-150) var(--s-ease-out);
16
+ transition: border-color var(--s-duration-150) var(--s-ease-out),
17
+ box-shadow var(--s-duration-150) var(--s-ease-out);
17
18
  display: block;
18
19
 
19
20
  &::placeholder {
@@ -28,6 +29,10 @@
28
29
  --_input-border: var(--s-interactive-primary);
29
30
  outline: 2px solid var(--s-focus-ring);
30
31
  outline-offset: 2px;
32
+
33
+ @supports (color: oklch(from red l c h)) {
34
+ outline-color: oklch(from var(--s-interactive-primary) l c h / .3);
35
+ }
31
36
  }
32
37
 
33
38
  &:disabled {
@@ -60,6 +65,16 @@ textarea[s-input] {
60
65
  min-height: 6rem;
61
66
  }
62
67
 
68
+ textarea[s-input][s-autosize] {
69
+ resize: none;
70
+
71
+ @supports (field-sizing: content) {
72
+ field-sizing: content;
73
+ min-height: 3lh;
74
+ max-height: 20lh;
75
+ }
76
+ }
77
+
63
78
  select[s-input] {
64
79
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
65
80
  background-repeat: no-repeat;
@@ -141,7 +156,8 @@ select[s-input] {
141
156
  cursor: pointer;
142
157
  width: 1.25rem;
143
158
  height: 1.25rem;
144
- transition: background-color var(--s-duration-150) var(--s-ease-out), border-color var(--s-duration-150) var(--s-ease-out);
159
+ transition: background-color var(--s-duration-150) var(--s-ease-out),
160
+ border-color var(--s-duration-150) var(--s-ease-out);
145
161
 
146
162
  &:checked {
147
163
  background-color: var(--s-interactive-primary);
@@ -229,3 +245,38 @@ select[s-input] {
229
245
  }
230
246
  }
231
247
  }
248
+
249
+ @supports (container-type: inline-size) {
250
+ @container surface style(--_surface-depth: 1) {
251
+ :where([s-input]) {
252
+ --_input-bg: var(--s-surface-sunken);
253
+ }
254
+
255
+ :where([s-checkbox]) input, :where([s-radio]) input {
256
+ background-color: var(--s-surface-sunken);
257
+ }
258
+ }
259
+
260
+ @container surface style(--_surface-depth: 2) {
261
+ :where([s-input]) {
262
+ --_input-bg: var(--s-surface-sunken);
263
+ --_input-border: var(--s-border-strong);
264
+ }
265
+
266
+ :where([s-checkbox]) input, :where([s-radio]) input {
267
+ background-color: var(--s-surface-sunken);
268
+ border-color: var(--s-border-strong);
269
+ }
270
+ }
271
+
272
+ @container surface style(--_surface-depth: -1) {
273
+ :where([s-input]) {
274
+ --_input-bg: var(--s-surface-raised);
275
+ --_input-border: var(--s-border-muted);
276
+ }
277
+
278
+ :where([s-checkbox]) input, :where([s-radio]) input {
279
+ background-color: var(--s-surface-raised);
280
+ }
281
+ }
282
+ }
@@ -0,0 +1,197 @@
1
+ :where([s-menu]) {
2
+ --_menu-bg: var(--s-surface-raised);
3
+ --_menu-border: var(--s-border-muted);
4
+ --_menu-radius: var(--s-radius-lg);
5
+ --_menu-shadow: var(--s-shadow-lg);
6
+ --_menu-min-width: 10rem;
7
+ --_menu-padding: var(--s-space-1);
8
+ --_menu-offset: var(--s-space-1);
9
+ }
10
+
11
+ [s-menu] {
12
+ anchor-scope: --menu-trigger;
13
+ display: inline-block;
14
+ position: relative;
15
+ }
16
+
17
+ [s-menu]::marker {
18
+ display: none;
19
+ }
20
+
21
+ [s-menu] ::-webkit-details-marker {
22
+ display: none;
23
+ }
24
+
25
+ [s-menu-trigger] {
26
+ cursor: pointer;
27
+ anchor-name: --menu-trigger;
28
+ list-style: none;
29
+ }
30
+
31
+ [s-menu-trigger]::-webkit-details-marker {
32
+ display: none;
33
+ }
34
+
35
+ [s-menu-items] {
36
+ z-index: 9999;
37
+ margin-top: var(--_menu-offset);
38
+ background-color: var(--_menu-bg);
39
+ border: 1px solid var(--_menu-border);
40
+ border-radius: var(--_menu-radius);
41
+ box-shadow: var(--_menu-shadow);
42
+ min-width: var(--_menu-min-width);
43
+ padding: var(--_menu-padding);
44
+ font-size: var(--s-text-sm);
45
+ color: var(--s-text-primary);
46
+ opacity: 0;
47
+ visibility: hidden;
48
+ transition: opacity var(--s-duration-150) var(--s-ease-out),
49
+ transform var(--s-duration-150) var(--s-ease-out),
50
+ visibility var(--s-duration-150);
51
+ flex-direction: column;
52
+ display: flex;
53
+ position: absolute;
54
+ top: 100%;
55
+ left: 0;
56
+ transform: scale(.95)translateY(-4px);
57
+ }
58
+
59
+ [s-menu][open] > [s-menu-items] {
60
+ opacity: 1;
61
+ visibility: visible;
62
+ transform: scale(1)translateY(0);
63
+ }
64
+
65
+ [s-menu="end"] > [s-menu-items] {
66
+ left: auto;
67
+ right: 0;
68
+ }
69
+
70
+ [s-menu="top"] > [s-menu-items] {
71
+ margin-top: 0;
72
+ margin-bottom: var(--_menu-offset);
73
+ top: auto;
74
+ bottom: 100%;
75
+ transform: scale(.95)translateY(4px);
76
+ }
77
+
78
+ [s-menu="top"][open] > [s-menu-items] {
79
+ transform: scale(1)translateY(0);
80
+ }
81
+
82
+ [s-menu="top-end"] > [s-menu-items] {
83
+ margin-top: 0;
84
+ margin-bottom: var(--_menu-offset);
85
+ inset: auto 0 100% auto;
86
+ transform: scale(.95)translateY(4px);
87
+ }
88
+
89
+ [s-menu="top-end"][open] > [s-menu-items] {
90
+ transform: scale(1)translateY(0);
91
+ }
92
+
93
+ @supports (anchor-scope: all) {
94
+ [s-menu-items] {
95
+ position-anchor: --menu-trigger;
96
+ inset: auto;
97
+ margin: 0;
98
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
99
+ margin-block-start: var(--_menu-offset);
100
+ position: absolute;
101
+ inset-block-start: anchor(end);
102
+ inset-inline-start: anchor(start);
103
+ }
104
+
105
+ [s-menu="end"] > [s-menu-items] {
106
+ inset-inline-start: auto;
107
+ inset-inline-end: anchor(end);
108
+ }
109
+
110
+ [s-menu="top"] > [s-menu-items] {
111
+ margin-block-start: 0;
112
+ margin-block-end: var(--_menu-offset);
113
+ inset-block-start: auto;
114
+ inset-block-end: anchor(start);
115
+ }
116
+
117
+ [s-menu="top-end"] > [s-menu-items] {
118
+ margin-block-start: 0;
119
+ margin-block-end: var(--_menu-offset);
120
+ inset-block-start: auto;
121
+ inset-block-end: anchor(start);
122
+ inset-inline-start: auto;
123
+ inset-inline-end: anchor(end);
124
+ }
125
+ }
126
+
127
+ [s-menu-item] {
128
+ align-items: center;
129
+ gap: var(--s-space-2);
130
+ width: 100%;
131
+ padding: var(--s-space-2) var(--s-space-3);
132
+ border-radius: var(--s-radius-md);
133
+ color: var(--s-text-primary);
134
+ font-size: inherit;
135
+ text-align: start;
136
+ cursor: pointer;
137
+ transition: background-color var(--s-duration-100) var(--s-ease-out);
138
+ background: none;
139
+ border: none;
140
+ display: flex;
141
+ }
142
+
143
+ [s-menu-item]:hover {
144
+ background-color: var(--s-surface-sunken);
145
+ }
146
+
147
+ [s-menu-item]:focus-visible {
148
+ outline: 2px solid var(--s-focus-ring);
149
+ outline-offset: -2px;
150
+ }
151
+
152
+ [s-menu-item]:disabled {
153
+ opacity: .5;
154
+ cursor: not-allowed;
155
+ }
156
+
157
+ [s-menu-item][s-danger] {
158
+ color: var(--s-state-danger);
159
+ }
160
+
161
+ [s-menu-item][s-danger]:hover {
162
+ background-color: var(--s-state-danger-bg);
163
+ }
164
+
165
+ [s-menu-divider] {
166
+ height: 1px;
167
+ margin: var(--s-space-1) 0;
168
+ background-color: var(--s-border-muted);
169
+ border: none;
170
+ }
171
+
172
+ [s-menu-label] {
173
+ padding: var(--s-space-2) var(--s-space-3);
174
+ font-size: var(--s-text-xs);
175
+ font-weight: var(--s-font-semibold);
176
+ color: var(--s-text-secondary);
177
+ text-transform: uppercase;
178
+ letter-spacing: var(--s-tracking-wide);
179
+ display: block;
180
+ }
181
+
182
+ @media (prefers-reduced-motion: reduce) {
183
+ [s-menu-items] {
184
+ transition: none;
185
+ }
186
+ }
187
+
188
+ @media (forced-colors: active) {
189
+ [s-menu-items] {
190
+ border: 2px solid canvastext;
191
+ }
192
+
193
+ [s-menu-item]:hover {
194
+ color: highlighttext;
195
+ background-color: highlight;
196
+ }
197
+ }