Skip to content

Commit 3f8fe71

Browse files
committed
fix(@clayui/css): Spinners deprecate Bootstrap 4 component. Enable again by setting $enable-bs4-deprecate: true;.
fix(@clayui/css): Spinners deprecate variables `$spinner-*`
1 parent d2c9027 commit 3f8fe71

File tree

2 files changed

+57
-41
lines changed

2 files changed

+57
-41
lines changed
Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,53 @@
1-
// Rotating border
1+
@if ($enable-bs4-deprecated) {
2+
// Rotating border
23

3-
@keyframes spinner-border {
4-
to {
5-
transform: rotate(360deg);
4+
@keyframes spinner-border {
5+
to {
6+
transform: rotate(360deg);
7+
}
68
}
7-
}
89

9-
.spinner-border {
10-
animation: spinner-border 0.75s linear infinite;
11-
border-radius: 50%;
12-
border-right-color: transparent;
13-
border: $spinner-border-width solid currentColor;
14-
display: inline-block;
15-
height: $spinner-height;
16-
vertical-align: text-bottom;
17-
width: $spinner-width;
18-
}
10+
.spinner-border {
11+
animation: spinner-border 0.75s linear infinite;
12+
border-radius: 50%;
13+
border-right-color: transparent;
14+
border: $spinner-border-width solid currentColor;
15+
display: inline-block;
16+
height: $spinner-height;
17+
vertical-align: text-bottom;
18+
width: $spinner-width;
19+
}
1920

20-
.spinner-border-sm {
21-
border-width: $spinner-border-width-sm;
22-
height: $spinner-height-sm;
23-
width: $spinner-width-sm;
24-
}
21+
.spinner-border-sm {
22+
border-width: $spinner-border-width-sm;
23+
height: $spinner-height-sm;
24+
width: $spinner-width-sm;
25+
}
2526

26-
// Growing circle
27+
// Growing circle
2728

28-
@keyframes spinner-grow {
29-
0% {
30-
transform: scale(0);
29+
@keyframes spinner-grow {
30+
0% {
31+
transform: scale(0);
32+
}
33+
50% {
34+
opacity: 1;
35+
}
3136
}
32-
50% {
33-
opacity: 1;
34-
}
35-
}
3637

37-
.spinner-grow {
38-
animation: spinner-grow 0.75s linear infinite;
39-
background-color: currentColor;
40-
border-radius: 50%;
41-
display: inline-block;
42-
height: $spinner-height;
43-
opacity: 0;
44-
vertical-align: text-bottom;
45-
width: $spinner-width;
46-
}
38+
.spinner-grow {
39+
animation: spinner-grow 0.75s linear infinite;
40+
background-color: currentColor;
41+
border-radius: 50%;
42+
display: inline-block;
43+
height: $spinner-height;
44+
opacity: 0;
45+
vertical-align: text-bottom;
46+
width: $spinner-width;
47+
}
4748

48-
.spinner-grow-sm {
49-
height: $spinner-height-sm;
50-
width: $spinner-width-sm;
49+
.spinner-grow-sm {
50+
height: $spinner-height-sm;
51+
width: $spinner-width-sm;
52+
}
5153
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1+
/// @deprecated as of v3.x with no replacement
2+
13
$spinner-border-width: 0.25em !default;
4+
5+
/// @deprecated as of v3.x with no replacement
6+
27
$spinner-width: 2rem !default;
38

9+
/// @deprecated as of v3.x with no replacement
10+
411
$spinner-height: $spinner-width !default;
512

613
// Spinner Sm
714

15+
/// @deprecated as of v3.x with no replacement
16+
817
$spinner-border-width-sm: 0.2em !default;
18+
19+
/// @deprecated as of v3.x with no replacement
20+
921
$spinner-width-sm: 1rem !default;
1022

23+
/// @deprecated as of v3.x with no replacement
24+
1125
$spinner-height-sm: $spinner-width-sm !default;

0 commit comments

Comments
 (0)