@carbon/styles 1.43.0-rc.0 → 1.44.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/css/styles.css +178 -43
- package/css/styles.min.css +1 -1
- package/package.json +3 -3
- package/scss/__tests__/theme-test.js +10 -0
- package/scss/components/accordion/_accordion.scss +13 -37
- package/scss/components/checkbox/_checkbox.scss +20 -0
- package/scss/components/combo-button/_combo-button.scss +1 -1
- package/scss/components/data-table/expandable/_data-table-expandable.scss +1 -1
- package/scss/components/dropdown/_dropdown.scss +4 -4
- package/scss/components/file-uploader/_file-uploader.scss +2 -2
- package/scss/components/list-box/_list-box.scss +1 -1
- package/scss/components/menu-button/_menu-button.scss +5 -1
- package/scss/components/radio-button/_radio-button.scss +23 -0
- package/scss/components/slug/_slug.scss +3 -12
- package/scss/components/tile/_tile.scss +102 -0
- package/scss/utilities/_ai-gradient.scss +56 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/styles",
|
|
3
3
|
"description": "Styles for the Carbon Design System",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.44.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@carbon/grid": "^11.21.0",
|
|
44
44
|
"@carbon/layout": "^11.20.0",
|
|
45
45
|
"@carbon/motion": "^11.16.0",
|
|
46
|
-
"@carbon/themes": "^11.
|
|
46
|
+
"@carbon/themes": "^11.28.0",
|
|
47
47
|
"@carbon/type": "^11.25.0",
|
|
48
48
|
"@ibm/plex": "6.0.0-next.6"
|
|
49
49
|
},
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"scss/**/*.css",
|
|
66
66
|
"css/**/*.css"
|
|
67
67
|
],
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "d9121f17b1dd935a5734c6eae10af275f72f6dc7"
|
|
69
69
|
}
|
|
@@ -136,6 +136,16 @@ describe('@carbon/styles/scss/theme', () => {
|
|
|
136
136
|
"slug-callout-gradient-bottom",
|
|
137
137
|
"slug-callout-aura-start",
|
|
138
138
|
"slug-callout-aura-end",
|
|
139
|
+
"slug-callout-gradient-top-hover",
|
|
140
|
+
"slug-callout-gradient-bottom-hover",
|
|
141
|
+
"slug-callout-aura-start-hover-01",
|
|
142
|
+
"slug-callout-aura-start-hover-02",
|
|
143
|
+
"slug-callout-aura-end-hover-01",
|
|
144
|
+
"slug-callout-aura-end-hover-02",
|
|
145
|
+
"slug-callout-gradient-top-selected",
|
|
146
|
+
"slug-callout-gradient-bottom-selected",
|
|
147
|
+
"slug-callout-aura-start-selected",
|
|
148
|
+
"slug-callout-aura-end-selected",
|
|
139
149
|
"ai-gradient-start-01",
|
|
140
150
|
"ai-gradient-start-02",
|
|
141
151
|
"ai-gradient-end",
|
|
@@ -59,7 +59,6 @@ $content-padding: 0 0 0 $spacing-05 !default;
|
|
|
59
59
|
display: list-item;
|
|
60
60
|
overflow: visible;
|
|
61
61
|
border-block-start: 1px solid $border-subtle;
|
|
62
|
-
transition: all $duration-fast-02 motion(standard, productive);
|
|
63
62
|
|
|
64
63
|
&:last-child {
|
|
65
64
|
border-block-end: 1px solid $border-subtle;
|
|
@@ -144,11 +143,18 @@ $content-padding: 0 0 0 $spacing-05 !default;
|
|
|
144
143
|
text-align: start;
|
|
145
144
|
}
|
|
146
145
|
|
|
146
|
+
.#{$prefix}--accordion__wrapper {
|
|
147
|
+
// Properties for when the accordion closes
|
|
148
|
+
padding: 0;
|
|
149
|
+
max-block-size: 0;
|
|
150
|
+
opacity: 0;
|
|
151
|
+
transition: all $duration-fast-02 motion(entrance, productive);
|
|
152
|
+
writing-mode: horizontal-tb;
|
|
153
|
+
}
|
|
154
|
+
|
|
147
155
|
.#{$prefix}--accordion__content {
|
|
148
|
-
|
|
156
|
+
overflow: hidden;
|
|
149
157
|
padding-inline: layout.density('padding-inline');
|
|
150
|
-
// Transition property for when the accordion closes
|
|
151
|
-
transition: padding motion(standard, productive) $duration-fast-02;
|
|
152
158
|
|
|
153
159
|
// Custom breakpoints based on issue #4993
|
|
154
160
|
@include breakpoint-up(480px) {
|
|
@@ -189,44 +195,14 @@ $content-padding: 0 0 0 $spacing-05 !default;
|
|
|
189
195
|
display: block;
|
|
190
196
|
}
|
|
191
197
|
|
|
192
|
-
@keyframes collapse-accordion {
|
|
193
|
-
0% {
|
|
194
|
-
@include -content-visible;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
100% {
|
|
198
|
-
@include -content-hidden;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
@keyframes expand-accordion {
|
|
203
|
-
0% {
|
|
204
|
-
@include -content-hidden;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
100% {
|
|
208
|
-
@include -content-visible;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.#{$prefix}--accordion__item--collapsing .#{$prefix}--accordion__content {
|
|
213
|
-
animation: $duration-fast-02 motion(standard, productive) collapse-accordion;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.#{$prefix}--accordion__item--expanding .#{$prefix}--accordion__content {
|
|
217
|
-
animation: $duration-fast-02 motion(standard, productive) expand-accordion;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
198
|
.#{$prefix}--accordion__item--active {
|
|
221
199
|
overflow: visible;
|
|
222
200
|
|
|
223
|
-
.#{$prefix}--
|
|
224
|
-
|
|
201
|
+
.#{$prefix}--accordion__wrapper {
|
|
202
|
+
// Properties for when the accordion opens
|
|
203
|
+
opacity: 1;
|
|
225
204
|
padding-block: $spacing-03;
|
|
226
205
|
padding-block-end: $spacing-06;
|
|
227
|
-
// Transition property for when the accordion opens
|
|
228
|
-
transition: padding-top motion(entrance, productive) $duration-fast-02,
|
|
229
|
-
padding-bottom motion(entrance, productive) $duration-fast-02;
|
|
230
206
|
}
|
|
231
207
|
|
|
232
208
|
.#{$prefix}--accordion__arrow {
|
|
@@ -361,4 +361,24 @@
|
|
|
361
361
|
.#{$prefix}--checkbox-label[data-contained-checkbox-state='true']::after {
|
|
362
362
|
transform: scale(1.2) rotate3d(0.5, 1, 0, 158deg);
|
|
363
363
|
}
|
|
364
|
+
|
|
365
|
+
// Slug styles
|
|
366
|
+
.#{$prefix}--checkbox-group--slug legend.#{$prefix}--label,
|
|
367
|
+
.#{$prefix}--checkbox-wrapper--slug .#{$prefix}--checkbox-label-text {
|
|
368
|
+
display: flex;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.#{$prefix}--checkbox-group--slug legend.#{$prefix}--label .#{$prefix}--slug,
|
|
372
|
+
.#{$prefix}--checkbox-wrapper--slug
|
|
373
|
+
.#{$prefix}--checkbox-label-text
|
|
374
|
+
.#{$prefix}--slug {
|
|
375
|
+
margin-inline-start: $spacing-03;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.#{$prefix}--checkbox-wrapper--slug
|
|
379
|
+
.#{$prefix}--checkbox-label-text
|
|
380
|
+
.#{$prefix}--slug__button--inline {
|
|
381
|
+
line-height: inherit;
|
|
382
|
+
margin-block-start: convert.to-rem(-1px);
|
|
383
|
+
}
|
|
364
384
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
@each $size, $trigger in $triggerSizes {
|
|
30
30
|
.#{$prefix}--combo-button__container--#{$size}
|
|
31
31
|
.#{$prefix}--combo-button__primary-action {
|
|
32
|
-
min-inline-size:
|
|
32
|
+
min-inline-size: 12rem - convert.to-rem(1px) - $trigger;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
align-items: center;
|
|
216
216
|
justify-content: center;
|
|
217
217
|
padding: 0 $spacing-03;
|
|
218
|
-
// Account for the border in `.
|
|
218
|
+
// Account for the border in `.cds--table-expand`
|
|
219
219
|
block-size: calc(100% + 1px);
|
|
220
220
|
inline-size: 100%;
|
|
221
221
|
vertical-align: inherit;
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
|
|
156
156
|
button.#{$prefix}--dropdown-text {
|
|
157
157
|
border: none;
|
|
158
|
-
// button-reset mixin contradicts with
|
|
158
|
+
// button-reset mixin contradicts with cds--dropdown-text styles
|
|
159
159
|
background: none;
|
|
160
160
|
color: $text-primary;
|
|
161
161
|
inline-size: 100%;
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
|
|
172
172
|
display: block;
|
|
173
173
|
overflow: hidden;
|
|
174
|
-
// Account for the border in `.
|
|
174
|
+
// Account for the border in `.cds--dropdown`
|
|
175
175
|
block-size: calc(100% + 1px);
|
|
176
176
|
// 2rem + SVG width
|
|
177
177
|
padding-inline-end: convert.to-rem(42px);
|
|
@@ -284,13 +284,13 @@
|
|
|
284
284
|
// We don't want to apply focus styles via focus selector when using the aria-activedescendant structure
|
|
285
285
|
.#{$prefix}--dropdown-list[aria-activedescendant]
|
|
286
286
|
.#{$prefix}--dropdown-link:focus {
|
|
287
|
-
// Copied from .
|
|
287
|
+
// Copied from .cds--dropdown-link styles
|
|
288
288
|
padding: convert.to-rem(11px) 0;
|
|
289
289
|
margin: 0 $spacing-05;
|
|
290
290
|
outline: none;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
// Need added weight for item that is :focused and .
|
|
293
|
+
// Need added weight for item that is :focused and .cds--dropdown--focused
|
|
294
294
|
.#{$prefix}--dropdown-list[aria-activedescendant]
|
|
295
295
|
.#{$prefix}--dropdown--focused:focus {
|
|
296
296
|
// copied from default focus styles
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
// This class is of old markup with "select file" button
|
|
56
|
-
// New code should use link-style "select file" UI (`.
|
|
56
|
+
// New code should use link-style "select file" UI (`.cds--file-browse-btn`)
|
|
57
57
|
// TODO: deprecate this block
|
|
58
58
|
.#{$prefix}--file-btn {
|
|
59
59
|
display: inline-flex;
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
.#{$prefix}--inline-loading__animation .#{$prefix}--loading {
|
|
163
|
-
// Vanilla markup has `.
|
|
163
|
+
// Vanilla markup has `.cds--inline-loading__animation` which is used for `margin-right` adjustment
|
|
164
164
|
margin-inline-end: 0;
|
|
165
165
|
}
|
|
166
166
|
|
|
@@ -308,7 +308,7 @@ $list-box-menu-width: convert.to-rem(300px);
|
|
|
308
308
|
display: inline-flex;
|
|
309
309
|
overflow: hidden;
|
|
310
310
|
align-items: center;
|
|
311
|
-
// Account for the border in `.
|
|
311
|
+
// Account for the border in `.cds--list-box`
|
|
312
312
|
block-size: calc(100% + 1px);
|
|
313
313
|
cursor: pointer;
|
|
314
314
|
outline: none;
|
|
@@ -14,8 +14,12 @@
|
|
|
14
14
|
/// @access public
|
|
15
15
|
/// @group menu-button
|
|
16
16
|
@mixin menu-button {
|
|
17
|
+
.#{$prefix}--menu-button__container {
|
|
18
|
+
display: inline-block;
|
|
19
|
+
}
|
|
20
|
+
|
|
17
21
|
.#{$prefix}--menu-button__trigger:not(.#{$prefix}--btn--ghost) {
|
|
18
|
-
min-inline-size:
|
|
22
|
+
min-inline-size: 12rem;
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
.#{$prefix}--menu-button__trigger svg {
|
|
@@ -280,4 +280,27 @@ $radio-border-width: 1px !default;
|
|
|
280
280
|
margin-inline-end: 0;
|
|
281
281
|
margin-inline-start: $spacing-03;
|
|
282
282
|
}
|
|
283
|
+
|
|
284
|
+
// Slug styles
|
|
285
|
+
.#{$prefix}--radio-button-group--slug legend.#{$prefix}--label,
|
|
286
|
+
.#{$prefix}--radio-button-wrapper--slug
|
|
287
|
+
.#{$prefix}--radio-button__label-text {
|
|
288
|
+
display: flex;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.#{$prefix}--radio-button-group--slug
|
|
292
|
+
legend.#{$prefix}--label
|
|
293
|
+
.#{$prefix}--slug,
|
|
294
|
+
.#{$prefix}--radio-button-wrapper--slug
|
|
295
|
+
.#{$prefix}--radio-button__label-text
|
|
296
|
+
.#{$prefix}--slug {
|
|
297
|
+
margin-inline-start: $spacing-03;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.#{$prefix}--radio-button-wrapper--slug
|
|
301
|
+
.#{$prefix}--radio-button__label-text
|
|
302
|
+
.#{$prefix}--slug__button--inline {
|
|
303
|
+
line-height: inherit;
|
|
304
|
+
margin-block-start: convert.to-rem(-1px);
|
|
305
|
+
}
|
|
283
306
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@use '../../spacing' as *;
|
|
5
5
|
@use '../../theme' as *;
|
|
6
6
|
@use '../../type' as *;
|
|
7
|
+
@use '../../utilities/ai-gradient' as *;
|
|
7
8
|
@use '../../utilities/convert';
|
|
8
9
|
|
|
9
10
|
$sizes: (
|
|
@@ -324,22 +325,12 @@ $sizes: (
|
|
|
324
325
|
|
|
325
326
|
// Slug callout styles
|
|
326
327
|
.#{$prefix}--slug.#{$prefix}--slug--enabled .#{$prefix}--slug-content {
|
|
328
|
+
@include callout-gradient();
|
|
329
|
+
|
|
327
330
|
border: 1px solid $border-subtle;
|
|
328
331
|
border-radius: 16px;
|
|
329
332
|
// 84px seems to make this fully opaque?
|
|
330
333
|
backdrop-filter: blur(25px);
|
|
331
|
-
background: linear-gradient(
|
|
332
|
-
0deg,
|
|
333
|
-
$slug-callout-aura-start 0%,
|
|
334
|
-
$slug-callout-aura-end 33%,
|
|
335
|
-
transparent 100%
|
|
336
|
-
),
|
|
337
|
-
linear-gradient(
|
|
338
|
-
180deg,
|
|
339
|
-
$slug-callout-gradient-top 0%,
|
|
340
|
-
$slug-callout-gradient-bottom 100%
|
|
341
|
-
)
|
|
342
|
-
rgba(0, 0, 0, 0.01);
|
|
343
334
|
// box-shadow seems to match the spec better
|
|
344
335
|
// than the same values plugged into `drop-shadow`
|
|
345
336
|
// filter: drop-shadow(-45px 45px 100px rgba(0, 0, 0, 0.2));
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
@use '../../spacing' as *;
|
|
14
14
|
@use '../../theme' as *;
|
|
15
15
|
@use '../../type' as *;
|
|
16
|
+
@use '../../utilities/ai-gradient' as *;
|
|
16
17
|
@use '../../utilities/button-reset';
|
|
17
18
|
@use '../../utilities/component-reset';
|
|
18
19
|
@use '../../utilities/focus-outline' as *;
|
|
@@ -368,6 +369,107 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
|
|
|
368
369
|
fill: $icon-disabled;
|
|
369
370
|
}
|
|
370
371
|
|
|
372
|
+
// Slug styles
|
|
373
|
+
.#{$prefix}--tile > .#{$prefix}--slug,
|
|
374
|
+
.#{$prefix}--tile--expandable > div > .#{$prefix}--slug,
|
|
375
|
+
.#{$prefix}--tile--clickable .#{$prefix}--tile--slug-icon {
|
|
376
|
+
position: absolute;
|
|
377
|
+
inset-block-start: $spacing-05;
|
|
378
|
+
inset-inline-end: $spacing-05;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.#{$prefix}--tile.#{$prefix}--tile--selectable > .#{$prefix}--slug {
|
|
382
|
+
inset-inline-end: $spacing-08;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.#{$prefix}--tile.#{$prefix}--tile--clickable > .#{$prefix}--slug {
|
|
386
|
+
pointer-events: none;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile {
|
|
390
|
+
@include callout-gradient();
|
|
391
|
+
|
|
392
|
+
border: 1px solid $border-tile;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--expandable:hover {
|
|
396
|
+
@include callout-gradient();
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable::before,
|
|
400
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable::after,
|
|
401
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--clickable::before {
|
|
402
|
+
position: absolute;
|
|
403
|
+
display: block;
|
|
404
|
+
block-size: 100%;
|
|
405
|
+
content: '';
|
|
406
|
+
inline-size: 100%;
|
|
407
|
+
inset-block-start: 0;
|
|
408
|
+
inset-inline-start: 0;
|
|
409
|
+
opacity: 0;
|
|
410
|
+
transition: opacity $duration-fast-02 motion(standard, productive);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable::before,
|
|
414
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--clickable::before {
|
|
415
|
+
@include callout-gradient('hover');
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable:hover::before,
|
|
419
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--clickable:hover::before {
|
|
420
|
+
opacity: 1;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable::after {
|
|
424
|
+
@include callout-gradient('selected');
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--is-selected::after {
|
|
428
|
+
opacity: 1;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--is-selected {
|
|
432
|
+
border-color: $border-inverse;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable
|
|
436
|
+
.#{$prefix}--tile-content,
|
|
437
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--clickable
|
|
438
|
+
.#{$prefix}--tile-content {
|
|
439
|
+
position: relative;
|
|
440
|
+
z-index: 1;
|
|
441
|
+
cursor: pointer;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable > .#{$prefix}--slug,
|
|
445
|
+
.#{$prefix}--tile--slug.#{$prefix}--tile--selectable
|
|
446
|
+
> .#{$prefix}--tile__checkmark {
|
|
447
|
+
z-index: 1;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.#{$prefix}--tile--expandable:has(
|
|
451
|
+
.#{$prefix}--slug > .#{$prefix}--popover--open
|
|
452
|
+
) {
|
|
453
|
+
overflow: visible;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// To Do: Replace svg overrides with actual AI icon
|
|
457
|
+
.#{$prefix}--tile--clickable .#{$prefix}--tile--slug-icon rect {
|
|
458
|
+
stroke: $icon-primary;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.#{$prefix}--tile--clickable .#{$prefix}--tile--slug-icon path {
|
|
462
|
+
fill: $icon-primary;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// Tile with slug and rounded corners
|
|
466
|
+
.#{$prefix}--tile--slug-rounded,
|
|
467
|
+
.#{$prefix}--tile--slug-rounded.#{$prefix}--tile--selectable::before,
|
|
468
|
+
.#{$prefix}--tile--slug-rounded.#{$prefix}--tile--selectable::after,
|
|
469
|
+
.#{$prefix}--tile--slug-rounded.#{$prefix}--tile--clickable::before {
|
|
470
|
+
border-radius: $spacing-05;
|
|
471
|
+
}
|
|
472
|
+
|
|
371
473
|
// Windows HCM fix
|
|
372
474
|
.#{$prefix}--tile__chevron svg,
|
|
373
475
|
.#{$prefix}--tile__checkmark svg,
|
|
@@ -9,12 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
/// Experimental - name and structure subject to change. Use at your own risk!
|
|
11
11
|
/// Adds AI gradient styles to a component
|
|
12
|
-
/// @access
|
|
12
|
+
/// @access private
|
|
13
13
|
/// @param {String} $direction - Direction of gradient from: `left`, `right`, `top`, and `bottom`
|
|
14
14
|
/// @param {Number} $width - Percentage width of gradient with regards to parent component
|
|
15
15
|
/// @example @include ai-gradient('right', '33%');
|
|
16
16
|
/// @group utilities
|
|
17
|
-
|
|
18
17
|
@mixin ai-gradient($direction: 'right', $width: 33%) {
|
|
19
18
|
$deg: 0;
|
|
20
19
|
@if $direction == 'bottom' {
|
|
@@ -40,3 +39,58 @@
|
|
|
40
39
|
transparent 100%
|
|
41
40
|
);
|
|
42
41
|
}
|
|
42
|
+
|
|
43
|
+
/// Experimental - name and structure subject to change. Use at your own risk!
|
|
44
|
+
/// Adds callout gradient styles to a component
|
|
45
|
+
/// @access private
|
|
46
|
+
/// @example @include callout-gradient();
|
|
47
|
+
/// @param {String} $type - Type of gradient, either 'default', 'selected' or 'hover'
|
|
48
|
+
/// @group utilities
|
|
49
|
+
@mixin callout-gradient($type: 'default') {
|
|
50
|
+
@if $type == 'hover' {
|
|
51
|
+
background: linear-gradient(
|
|
52
|
+
0deg,
|
|
53
|
+
theme.$slug-callout-aura-start-hover-01 0%,
|
|
54
|
+
theme.$slug-callout-aura-end-hover-01 50%,
|
|
55
|
+
transparent 50%
|
|
56
|
+
),
|
|
57
|
+
linear-gradient(
|
|
58
|
+
0deg,
|
|
59
|
+
theme.$slug-callout-aura-start-hover-02 0%,
|
|
60
|
+
theme.$slug-callout-aura-end-hover-02 50%,
|
|
61
|
+
transparent 50%
|
|
62
|
+
),
|
|
63
|
+
linear-gradient(
|
|
64
|
+
180deg,
|
|
65
|
+
theme.$slug-callout-gradient-top-hover 0%,
|
|
66
|
+
theme.$slug-callout-gradient-bottom-hover 100%
|
|
67
|
+
)
|
|
68
|
+
rgba(0, 0, 0, 0.01);
|
|
69
|
+
} @else if $type == 'selected' {
|
|
70
|
+
background: linear-gradient(
|
|
71
|
+
0deg,
|
|
72
|
+
theme.$slug-callout-aura-start-selected 0%,
|
|
73
|
+
theme.$slug-callout-aura-end-selected 50%,
|
|
74
|
+
transparent 50%
|
|
75
|
+
),
|
|
76
|
+
linear-gradient(
|
|
77
|
+
180deg,
|
|
78
|
+
theme.$slug-callout-gradient-top-selected 0%,
|
|
79
|
+
theme.$slug-callout-gradient-bottom-selected 100%
|
|
80
|
+
)
|
|
81
|
+
rgba(0, 0, 0, 0.01);
|
|
82
|
+
} @else {
|
|
83
|
+
background: linear-gradient(
|
|
84
|
+
0deg,
|
|
85
|
+
theme.$slug-callout-aura-start 0%,
|
|
86
|
+
theme.$slug-callout-aura-end 50%,
|
|
87
|
+
transparent 50%
|
|
88
|
+
),
|
|
89
|
+
linear-gradient(
|
|
90
|
+
180deg,
|
|
91
|
+
theme.$slug-callout-gradient-top 0%,
|
|
92
|
+
theme.$slug-callout-gradient-bottom 100%
|
|
93
|
+
)
|
|
94
|
+
rgba(0, 0, 0, 0.01);
|
|
95
|
+
}
|
|
96
|
+
}
|