-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathlinear.progress.fluent.scss
More file actions
70 lines (60 loc) · 1.64 KB
/
linear.progress.fluent.scss
File metadata and controls
70 lines (60 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@use 'styles/utilities' as *;
@use '../light/themes' as *;
@use '../../vars' as *;
@use '../../animations' as *;
$theme: $fluent;
$track-color: color(gray, 200);
:host(:dir(rtl)[indeterminate]),
:host([dir='rtl']) {
[part~='track'] {
transform: rotateY(0deg);
}
[part~='indeterminate'] {
animation-name: igc-indeterminate-bar-fluent-rtl;
}
}
:host([label-align='top']),
:host([label-align='top-start']),
:host([label-align='top-end']) {
[part~='track'] {
margin-block-start: rem(2px);
}
}
:host([label-align='bottom']),
:host([label-align='bottom-start']),
:host([label-align='bottom-end']) {
[part~='track'] {
margin-block-end: rem(2px);
}
}
[part~='indeterminate']:not([part~='secondary']) {
width: 33% !important;
min-width: 33%;
animation-name: igc-indeterminate-bar-fluent;
animation-duration: var(--linear-animation-duration);
animation-timing-function: ease;
animation-iteration-count: infinite;
left: auto;
&::after {
display: none;
}
}
[part~='secondary'] {
display: none;
}
// Mixin for Gradient Backgrounds
@mixin gradient-indeterminate($part, $color-key) {
[part~='#{$part}'][part~='indeterminate'] {
background: linear-gradient(90deg, transparent 0%, var-get($theme, $color-key) 50%, transparent 100%);
}
}
// Apply Gradient Backgrounds
@each $part, $color-key in (
'primary': 'fill-color-default',
'danger': 'fill-color-danger',
'warning': 'fill-color-warning',
'info': 'fill-color-info',
'success': 'fill-color-success'
) {
@include gradient-indeterminate($part, $color-key);
}