forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_inline-loading.scss
100 lines (86 loc) · 2.17 KB
/
_inline-loading.scss
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//
// Copyright IBM Corp. 2016, 2023
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//
@use 'keyframes';
@use '../loading';
@use '../../config' as *;
@use '../../spacing' as *;
@use '../../theme' as *;
@use '../../type' as *;
@use '../../utilities/convert';
/// @type Number
/// @access private
/// @group loading
$-loading-gap-small: 110;
/// Inline loading styles
/// @access public
/// @group inline-loading
@mixin inline-loading {
.#{$prefix}--inline-loading {
display: flex;
align-items: center;
inline-size: 100%;
min-block-size: 2rem;
}
.#{$prefix}--inline-loading__text {
@include type-style('label-01');
color: $text-secondary;
}
.#{$prefix}--inline-loading__animation {
position: relative;
display: flex;
align-items: center;
justify-content: center;
margin-inline-end: $spacing-03;
}
.#{$prefix}--inline-loading__checkmark-container {
fill: $support-success;
// For deprecated older markup
&.#{$prefix}--inline-loading__svg {
position: absolute;
inline-size: 0.75rem;
inset-block-start: 0.75rem;
}
&[hidden] {
display: none;
}
}
.#{$prefix}--inline-loading__checkmark {
animation-duration: 250ms;
animation-fill-mode: forwards;
animation-name: stroke;
fill: none;
stroke: $interactive;
stroke-dasharray: 12;
stroke-dashoffset: 12;
stroke-width: 1.8;
transform-origin: 50% 50%;
}
.#{$prefix}--inline-loading--error {
block-size: convert.to-rem(16px);
fill: $support-error;
inline-size: convert.to-rem(16px);
&[hidden] {
display: none;
}
}
.#{$prefix}--loading--small .#{$prefix}--inline-loading__svg {
stroke: $interactive;
}
/* If IE11 Don't show check animation */
@media screen and (-ms-high-contrast: active),
screen and (-ms-high-contrast: none) {
.#{$prefix}--inline-loading__checkmark-container {
inset-block-start: 1px;
inset-inline-end: 0.5rem;
}
.#{$prefix}--inline-loading__checkmark {
animation: none;
stroke-dasharray: 0;
stroke-dashoffset: 0;
}
}
}