@@ -95,8 +95,8 @@ governing permissions and limitations under the License.
95
95
96
96
/* Swatch styles */
97
97
.spectrum-Swatch {
98
- width : var (--spectrum-swatch-size );
99
- height : var (--spectrum-swatch-size );
98
+ width : var (--mod-swatch-size , var ( -- spectrum-swatch-size) );
99
+ height : var (--mod-swatch-size , var ( -- spectrum-swatch-size) );
100
100
101
101
display : flex;
102
102
align-items : center;
@@ -111,20 +111,20 @@ governing permissions and limitations under the License.
111
111
user-select : none;
112
112
113
113
.spectrum-Swatch-disabledIcon {
114
- width : var (--spectrum-swatch-disabled-icon-size );
115
- height : var (--spectrum-swatch-disabled-icon-size );
114
+ width : var (--mod-swatch-disabled-icon-size , var ( -- spectrum-swatch-disabled-icon-size) );
115
+ height : var (--mod-swatch-disabled-icon-size , var ( -- spectrum-swatch-disabled-icon-size) );
116
116
}
117
117
118
118
& ,
119
119
& : before {
120
- border-radius : var (--spectrum-swatch-border-radius );
120
+ border-radius : var (--mod-swatch-border-radius , var ( -- spectrum-swatch-border-radius) );
121
121
}
122
122
123
123
& .is-selected {
124
124
background-color : var (--spectrum-swatch-inner-border-color-selected );
125
125
.spectrum-Swatch-fill {
126
- width : calc (100% - var (--spectrum-swatch-spacing-selected ));
127
- height : calc (100% - var (--spectrum-swatch-spacing-selected ));
126
+ width : calc (100% - var (--mod-swatch-spacing-selected , var ( -- spectrum-swatch-spacing-selected) ));
127
+ height : calc (100% - var (--mod-swatch-spacing-selected , var ( -- spectrum-swatch-spacing-selected) ));
128
128
129
129
/* no border radius when selected */
130
130
border-radius : 0 ;
@@ -158,7 +158,7 @@ governing permissions and limitations under the License.
158
158
159
159
/* Slash */
160
160
& : after {
161
- height : var (--spectrum-swatch-slash-thickness );
161
+ height : var (--mod-swatch-slash-thickness , var ( -- spectrum-swatch-slash-thickness) );
162
162
content : '' ;
163
163
position : absolute;
164
164
transform : rotate (-45deg );
@@ -206,8 +206,8 @@ governing permissions and limitations under the License.
206
206
207
207
opacity : 0 ;
208
208
209
- border : var (--spectrum-swatch-focus-ring-thickness ) solid var (--spectrum-swatch-focus-ring-color );
210
- border-radius : var (--spectrum-swatch-focus-ring-border-radius );
209
+ border : var (--mod-swatch-focus-ring-thickness , var ( -- spectrum-swatch-focus-ring-thickness) ) solid var (--spectrum-swatch-focus-ring-color );
210
+ border-radius : var (--mod-swatch-focus-ring-border-radius , var ( --mod-swatch-focus-ring-border-radius , var ( -- spectrum-swatch-focus-ring-border-radius)) );
211
211
212
212
transition : opacity var (--spectrum-animation-duration-100 ) ease-in-out;
213
213
}
@@ -232,7 +232,7 @@ governing permissions and limitations under the License.
232
232
233
233
overflow : hidden;
234
234
235
- border-radius : var (--spectrum-swatch-border-radius );
235
+ border-radius : var (--mod-swatch-border-radius , var ( -- spectrum-swatch-border-radius) );
236
236
237
237
background-color : var (--spectrum-swatch-fill-background-color );
238
238
@@ -243,14 +243,14 @@ governing permissions and limitations under the License.
243
243
--spectrum-swatch-checkerboard-dark-color : rgb (217 , 217 , 217 );
244
244
245
245
background-size :
246
- calc (var (--spectrum-swatch-checkerboard-size ) * 2 )
247
- calc (var (--spectrum-swatch-checkerboard-size ) * 2 );
246
+ calc (var (--mod-swatch-checkerboard-size , var ( -- spectrum-swatch-checkerboard-size) ) * 2 )
247
+ calc (var (--mod-swatch-checkerboard-size , var ( -- spectrum-swatch-checkerboard-size) ) * 2 );
248
248
249
249
background-position :
250
250
var (--spectrum-swatch-checkerboard-background-offset ) var (--spectrum-swatch-checkerboard-background-offset ),
251
- var (--spectrum-swatch-checkerboard-background-offset ) calc (var (--spectrum-swatch-checkerboard-size ) + var (--spectrum-swatch-checkerboard-background-offset )),
252
- calc (var (--spectrum-swatch-checkerboard-size ) + var (--spectrum-swatch-checkerboard-background-offset )) calc (-1 * var (--spectrum-swatch-checkerboard-size ) + var (--spectrum-swatch-checkerboard-background-offset )),
253
- calc (-1 * var (--spectrum-swatch-checkerboard-size ) + var (--spectrum-swatch-checkerboard-background-offset )) var (--spectrum-swatch-checkerboard-background-offset );
251
+ var (--spectrum-swatch-checkerboard-background-offset ) calc (var (--mod-swatch-checkerboard-size , var ( -- spectrum-swatch-checkerboard-size) ) + var (--spectrum-swatch-checkerboard-background-offset )),
252
+ calc (var (--mod-swatch-checkerboard-size , var ( -- spectrum-swatch-checkerboard-size )) + var (--spectrum-swatch-checkerboard-background-offset )) calc (-1 * var (--mod-swatch-checkerboard-size , var ( -- spectrum-swatch-checkerboard-size) ) + var (--spectrum-swatch-checkerboard-background-offset )),
253
+ calc (-1 * var (--mod-swatch-checkerboard-size , var ( -- spectrum-swatch-checkerboard-size) ) + var (--spectrum-swatch-checkerboard-background-offset )) var (--spectrum-swatch-checkerboard-background-offset );
254
254
255
255
/* Add a half-percent to fix diagonal line issue in Chrome on non-retina displays */
256
256
background-image :
@@ -270,17 +270,17 @@ governing permissions and limitations under the License.
270
270
background-color : var (--mod-swatch-fill-background-color , var (--spectrum-swatch-fill-background-color ), transparent);
271
271
272
272
/* Swatch border */
273
- box-shadow : inset 0 0 0 var (--spectrum-swatch-border-thickness ) var (--spectrum-swatch-border-color-regular );
273
+ box-shadow : inset 0 0 0 var (--mod-swatch-border-thickness , var ( -- spectrum-swatch-border-thickness) ) var (--spectrum-swatch-border-color-regular );
274
274
275
- border-radius : var (--spectrum-swatch-border-radius );
275
+ border-radius : var (--mod-swatch-border-radius , var ( -- spectrum-swatch-border-radius) );
276
276
}
277
277
}
278
278
279
279
/* Variant: Light border */
280
280
.spectrum-Swatch--lightBorder {
281
281
.spectrum-Swatch-fill {
282
282
& : before {
283
- box-shadow : inset 0 0 0 var (--spectrum-swatch-border-thickness ) var (--spectrum-swatch-border-color-light );
283
+ box-shadow : inset 0 0 0 var (--mod-swatch-border-thickness , var ( -- spectrum-swatch-border-thickness) ) var (--spectrum-swatch-border-color-light );
284
284
}
285
285
}
286
286
}
@@ -313,21 +313,7 @@ governing permissions and limitations under the License.
313
313
}
314
314
315
315
.spectrum-Swatch--rectangle {
316
- & .spectrum-Swatch--sizeXS {
317
- width : calc (var (--spectrum-swatch-size ) * 2 );
318
- }
319
-
320
- & .spectrum-Swatch--sizeS {
321
- width : calc (var (--spectrum-swatch-size ) * 2 );
322
- }
323
-
324
- & .spectrum-Swatch--sizeM {
325
- width : calc (var (--spectrum-swatch-size ) * 2 );
326
- }
327
-
328
- & .spectrum-Swatch--sizeL {
329
- width : calc (var (--spectrum-swatch-size ) * 2 );
330
- }
316
+ width : calc (var (--mod-swatch-size , var (--spectrum-swatch-size )) * 2 );
331
317
}
332
318
333
319
/* Variant: Rounding - None */
@@ -364,6 +350,6 @@ governing permissions and limitations under the License.
364
350
width : 100% ;
365
351
height : 100% ;
366
352
367
- transition : width var (--spectrum-animation-duration-100 ) ease-in-out,
368
- height var (--spectrum-animation-duration-100 ) ease-in-out;
353
+ transition : width var (--mod-animation-duration-100 , var ( -- spectrum-animation-duration-100) ) ease-in-out,
354
+ height var (--mod-animation-duration-100 , var ( -- spectrum-animation-duration-100) ) ease-in-out;
369
355
}
0 commit comments