@@ -22,16 +22,6 @@ governing permissions and limitations under the License.
22
22
/* text and icon color default white for all t-shirt sizes and all themes */
23
23
--spectrum-badge-label-icon-color : var (--spectrum-white );
24
24
25
- /* text and icon color is black for these background colors */
26
- & --orange , & --yellow , & --chartreuse , & --celery {
27
- --spectrum-badge-label-icon-color : var (--spectrum-black );
28
- }
29
-
30
- /* dark theme all non-semantic colors are black */
31
- & --gray , & --red , & --green , & --seafoam , & --cyan , & --blue , & --indigo , & --purple , & --fuchsia , & --magenta {
32
- --spectrum-badge-label-icon-color : var (--spectrum-badge-label-icon-color-primary );
33
- }
34
-
35
25
/* background color default for all t-shirt sizes and all themes */
36
26
--spectrum-badge-background-color-default : var (--spectrum-neutral-subdued-background-color-default );
37
27
@@ -81,6 +71,27 @@ governing permissions and limitations under the License.
81
71
--spectrum-badge-icon-only-spacing-horizontal : var (--spectrum-component-edge-to-visual-only-100 );
82
72
}
83
73
74
+ /* text and icon color is black for these background colors */
75
+ .spectrum-Badge--orange ,
76
+ .spectrum-Badge--yellow ,
77
+ .spectrum-Badge--chartreuse ,
78
+ .spectrum-Badge--celery {
79
+ --spectrum-badge-label-icon-color : var (--spectrum-black );
80
+ }
81
+
82
+ /* dark theme all non-semantic colors are black */
83
+ .spectrum-Badge--gray ,
84
+ .spectrum-Badge--red ,
85
+ .spectrum-Badge--green ,
86
+ .spectrum-Badge--seafoam ,
87
+ .spectrum-Badge--cyan ,
88
+ .spectrum-Badge--blue ,
89
+ .spectrum-Badge--indigo ,
90
+ .spectrum-Badge--purple ,
91
+ .spectrum-Badge--fuchsia ,
92
+ .spectrum-Badge--magenta {
93
+ --spectrum-badge-label-icon-color : var (--spectrum-badge-label-icon-color-primary );
94
+ }
84
95
85
96
.spectrum-Badge--sizeS {
86
97
--spectrum-badge-height : var (--spectrum-component-height-75 );
@@ -162,116 +173,117 @@ governing permissions and limitations under the License.
162
173
var (--spectrum-badge-background-color-default ));
163
174
color : var (--mod-badge-label-icon-color ,
164
175
var (--spectrum-badge-label-icon-color ));
176
+ }
165
177
166
- /* background color variants */
167
- & --neutral {
168
- background : var (--mod-badge-background-color-default ,
169
- var (--spectrum-badge-background-color-default ));
170
- }
178
+ /* background color variants */
179
+ . spectrum-Badge --neutral {
180
+ background : var (--mod-badge-background-color-default ,
181
+ var (--spectrum-badge-background-color-default ));
182
+ }
171
183
172
- & --accent {
173
- background : var (--mod-badge-background-color-accent ,
174
- var (--spectrum-badge-background-color-accent ));
175
- }
184
+ . spectrum-Badge --accent {
185
+ background : var (--mod-badge-background-color-accent ,
186
+ var (--spectrum-badge-background-color-accent ));
187
+ }
176
188
177
- & --informative {
178
- background : var (--mod-badge-background-color-informative ,
179
- var (--spectrum-badge-background-color-informative ));
180
- }
189
+ . spectrum-Badge --informative {
190
+ background : var (--mod-badge-background-color-informative ,
191
+ var (--spectrum-badge-background-color-informative ));
192
+ }
181
193
182
- & --negative {
183
- background : var (--mod-badge-background-color-negative ,
184
- var (--spectrum-badge-background-color-negative ));
185
- }
194
+ . spectrum-Badge --negative {
195
+ background : var (--mod-badge-background-color-negative ,
196
+ var (--spectrum-badge-background-color-negative ));
197
+ }
186
198
187
- & --positive {
188
- background : var (--mod-badge-background-color-positive ,
189
- var (--spectrum-badge-background-color-positive ));
190
- }
199
+ . spectrum-Badge --positive {
200
+ background : var (--mod-badge-background-color-positive ,
201
+ var (--spectrum-badge-background-color-positive ));
202
+ }
191
203
192
- & --notice {
193
- background : var (--mod-badge-background-color-notice , var (--spectrum-badge-background-color-notice ));
194
- }
204
+ . spectrum-Badge --notice {
205
+ background : var (--mod-badge-background-color-notice , var (--spectrum-badge-background-color-notice ));
206
+ }
195
207
196
- /* non-semantic colors */
197
- & --gray {
198
- background : var (--mod-badge-background-color-gray , var (--spectrum-badge-background-color-gray ));
199
- }
208
+ /* non-semantic colors */
209
+ . spectrum-Badge --gray {
210
+ background : var (--mod-badge-background-color-gray , var (--spectrum-badge-background-color-gray ));
211
+ }
200
212
201
- & --red {
202
- background : var (--mod-badge-background-color-red , var (--spectrum-badge-background-color-red ));
203
- }
213
+ . spectrum-Badge --red {
214
+ background : var (--mod-badge-background-color-red , var (--spectrum-badge-background-color-red ));
215
+ }
204
216
205
- & --orange {
206
- background : var (--mod-badge-background-color-orange , var (--spectrum-badge-background-color-orange ));
207
- }
217
+ . spectrum-Badge --orange {
218
+ background : var (--mod-badge-background-color-orange , var (--spectrum-badge-background-color-orange ));
219
+ }
208
220
209
- & --yellow {
210
- background : var (--mod-badge-background-color-yellow , var (--spectrum-badge-background-color-yellow ));
211
- }
221
+ . spectrum-Badge --yellow {
222
+ background : var (--mod-badge-background-color-yellow , var (--spectrum-badge-background-color-yellow ));
223
+ }
212
224
213
- & --chartreuse {
214
- background : var (--mod-badge-background-color-chartreuse , var (--spectrum-badge-background-color-chartreuse ));
215
- }
225
+ . spectrum-Badge --chartreuse {
226
+ background : var (--mod-badge-background-color-chartreuse , var (--spectrum-badge-background-color-chartreuse ));
227
+ }
216
228
217
- & --celery {
218
- background : var (--mod-badge-background-color-celery , var (--spectrum-badge-background-color-celery ));
219
- }
229
+ . spectrum-Badge --celery {
230
+ background : var (--mod-badge-background-color-celery , var (--spectrum-badge-background-color-celery ));
231
+ }
220
232
221
- & --green {
222
- background : var (--mod-badge-background-color-green , var (--spectrum-badge-background-color-green ));
223
- }
233
+ . spectrum-Badge --green {
234
+ background : var (--mod-badge-background-color-green , var (--spectrum-badge-background-color-green ));
235
+ }
224
236
225
- & --seafoam {
226
- background : var (--mod-badge-background-color-seafoam , var (--spectrum-badge-background-color-seafoam ));
227
- }
237
+ . spectrum-Badge --seafoam {
238
+ background : var (--mod-badge-background-color-seafoam , var (--spectrum-badge-background-color-seafoam ));
239
+ }
228
240
229
- & --cyan {
230
- background : var (--mod-badge-background-color-cyan , var (--spectrum-badge-background-color-cyan ));
231
- }
241
+ . spectrum-Badge --cyan {
242
+ background : var (--mod-badge-background-color-cyan , var (--spectrum-badge-background-color-cyan ));
243
+ }
232
244
233
- & --blue {
234
- background : var (--mod-badge-background-color-blue , var (--spectrum-badge-background-color-blue ));
235
- }
245
+ . spectrum-Badge --blue {
246
+ background : var (--mod-badge-background-color-blue , var (--spectrum-badge-background-color-blue ));
247
+ }
236
248
237
- & --indigo {
238
- background : var (--mod-badge-background-color-indigo , var (--spectrum-badge-background-color-indigo ));
239
- }
249
+ . spectrum-Badge --indigo {
250
+ background : var (--mod-badge-background-color-indigo , var (--spectrum-badge-background-color-indigo ));
251
+ }
240
252
241
- & --purple {
242
- background : var (--mod-badge-background-color-purple , var (--spectrum-badge-background-color-purple ));
243
- }
253
+ . spectrum-Badge --purple {
254
+ background : var (--mod-badge-background-color-purple , var (--spectrum-badge-background-color-purple ));
255
+ }
244
256
245
- & --fuchsia {
246
- background : var (--mod-badge-background-color-fuchsia , var (--spectrum-badge-background-color-fuchsia ));
247
- }
257
+ . spectrum-Badge --fuchsia {
258
+ background : var (--mod-badge-background-color-fuchsia , var (--spectrum-badge-background-color-fuchsia ));
259
+ }
248
260
249
- & --magenta {
250
- background : var (--mod-badge-background-color-magenta , var (--spectrum-badge-background-color-magenta ));
251
- }
261
+ . spectrum-Badge --magenta {
262
+ background : var (--mod-badge-background-color-magenta , var (--spectrum-badge-background-color-magenta ));
263
+ }
252
264
253
- /* fixed position variants with border radius 0 on the fixed edge of the component */
254
- & --fixed-inline-start {
255
- border-start-start-radius : 0 ;
256
- border-end-start-radius : 0 ;
257
- }
265
+ /* fixed position variants with border radius 0 on the fixed edge of the component */
266
+ . spectrum-Badge --fixed-inline-start {
267
+ border-start-start-radius : 0 ;
268
+ border-end-start-radius : 0 ;
269
+ }
258
270
259
- & --fixed-inline-end {
260
- border-start-end-radius : 0 ;
261
- border-end-end-radius : 0 ;
262
- }
271
+ . spectrum-Badge --fixed-inline-end {
272
+ border-start-end-radius : 0 ;
273
+ border-end-end-radius : 0 ;
274
+ }
263
275
264
- & --fixed-block-start {
265
- border-start-start-radius : 0 ;
266
- border-start-end-radius : 0 ;
267
- }
276
+ . spectrum-Badge --fixed-block-start {
277
+ border-start-start-radius : 0 ;
278
+ border-start-end-radius : 0 ;
279
+ }
268
280
269
- & --fixed-block-end {
270
- border-end-start-radius : 0 ;
271
- border-end-end-radius : 0 ;
272
- }
281
+ .spectrum-Badge--fixed-block-end {
282
+ border-end-start-radius : 0 ;
283
+ border-end-end-radius : 0 ;
273
284
}
274
285
286
+
275
287
/* label */
276
288
.spectrum-Badge-label {
277
289
font-size : var (--mod-badge-font-size ,
@@ -328,12 +340,12 @@ governing permissions and limitations under the License.
328
340
329
341
color : var (--mod-badge-label-icon-color ,
330
342
var (--spectrum-badge-label-icon-color ));
343
+ }
331
344
332
- & --no-label {
333
- /* icon without label has identical padding left and right */
334
- padding-inline-start : var (--mod-badge-icon-only-spacing-horizontal ,
335
- var (--spectrum-badge-icon-only-spacing-horizontal ));
336
- padding-inline-end : var (--mod-badge-icon-only-spacing-horizontal ,
337
- var (--spectrum-badge-icon-only-spacing-horizontal ));
338
- }
345
+ .spectrum-Badge-icon--no-label {
346
+ /* icon without label has identical padding left and right */
347
+ padding-inline-start : var (--mod-badge-icon-only-spacing-horizontal ,
348
+ var (--spectrum-badge-icon-only-spacing-horizontal ));
349
+ padding-inline-end : var (--mod-badge-icon-only-spacing-horizontal ,
350
+ var (--spectrum-badge-icon-only-spacing-horizontal ));
339
351
}
0 commit comments