Debian Codegraph @

docs/src/scss/extensions/_progressbar.scss

raw
1 @use "../palette/material_color";
2 @use "../utilities/convert";
3
4 .md-typeset {
5
6 /* Progress Bars */
7 .progress-label {
8 position: absolute;
9 width: 100%;
10 margin: 0;
11 color: var(--md-text-color);
12 font-weight: 700;
13 line-height: convert.px2rem(28px);
14 white-space: nowrap;
15 text-align: center;
16 text-shadow:
17 convert.px2em(-1px) convert.px2em(-1px) convert.px2em(6px) var(--md-default-bg-color--light),
18 convert.px2em(1px) convert.px2em(-1px) convert.px2em(6px) var(--md-default-bg-color--light),
19 convert.px2em(-1px) convert.px2em(1px) convert.px2em(6px) var(--md-default-bg-color--light),
20 convert.px2em(1px) convert.px2em(1px) convert.px2em(6px) var(--md-default-bg-color--light);
21 }
22
23 .progress-bar {
24 float: left;
25 height: convert.px2rem(24px);
26 background-color: material_color.$clr-blue-a400;
27 }
28
29 /* Stripe animation */
30 .candystripe-animate {
31 .progress-bar{
32 animation: animate-stripes 3s linear infinite;
33 }
34 }
35
36 .progress {
37 position: relative;
38 display: block;
39 width: 100%;
40 height: convert.px2rem(24px);
41 margin: convert.px2rem(10px) 0;
42 background-color: var(--md-default-fg-color--lightest);
43
44 &.thin {
45 height: convert.px2rem(8px);
46 margin-top: convert.px2rem(18px);
47
48 .progress-label {
49 margin-top: convert.px2rem(-8px);
50 }
51
52 .progress-bar {
53 height: convert.px2rem(8px);
54 }
55 }
56
57 &.candystripe .progress-bar {
58 background-image:
59 linear-gradient(
60 135deg,
61 var(--md-progress-stripe) 27%,
62 transparent 27%,
63 transparent 52%,
64 var(--md-progress-stripe) 52%,
65 var(--md-progress-stripe) 77%,
66 transparent 77%,
67 transparent
68 );
69 background-size: convert.px2rem(40px) convert.px2rem(40px);
70 }
71 }
72
73 @each $percent, $color in (
74 "100": var(--md-progress-100),
75 "80": var(--md-progress-80),
76 "60": var(--md-progress-60),
77 "40": var(--md-progress-40),
78 "20": var(--md-progress-20),
79 "0": var(--md-progress-0)
80 ) {
81 .progress-#{$percent}plus {
82 .progress-bar {
83 background-color: $color;
84 }
85 }
86 }
87
88 @keyframes animate-stripes {
89 0% {
90 background-position: 0 0;
91 }
92
93 100% {
94 background-position: convert.px2rem(120px) 0;
95 }
96 }
97 }