Skip to content

Commit cf383e0

Browse files
authored
Skeleton: fix FF support! (#2887)
and refactor styles for simpler keyframes
1 parent e97ef2c commit cf383e0

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

packages/core/src/components/skeleton/_common.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
@import "../../common/variables";
44

5-
$skeleton-animation: ($pt-transition-duration * 20) linear infinite glow !default;
5+
$skeleton-animation:
6+
($pt-transition-duration * 10) linear infinite alternate skeleton-glow !default;
67
$skeleton-color-start: rgba($gray4, 0.2) !default;
78
$skeleton-color-end: rgba($gray1, 0.2) !default;

packages/core/src/components/skeleton/_skeleton.scss

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,28 @@ Markup:
2121
Styleguide skeleton
2222
*/
2323

24-
@keyframes glow {
25-
0%,
26-
100% {
24+
@keyframes skeleton-glow {
25+
from {
2726
border-color: $skeleton-color-start;
28-
background-color: $skeleton-color-start;
27+
background: $skeleton-color-start;
2928
}
3029

31-
50% {
30+
to {
3231
border-color: $skeleton-color-end;
33-
background-color: $skeleton-color-end;
32+
background: $skeleton-color-end;
3433
}
3534
}
3635

37-
// This class hides content with a glowing, rounded rectangle. CSS properties that should always
38-
// override consumer values use the "!important" rule.
36+
// This class hides content with a glowing, rounded rectangle.
37+
// CSS properties that should always override consumer values use the "!important" rule.
3938
/* stylelint-disable declaration-no-important */
4039
.#{$ns}-skeleton {
4140
border-color: $skeleton-color-start !important;
4241
border-radius: 2px;
4342
box-shadow: none !important;
44-
background: $skeleton-color-start !important;
43+
44+
// do not !important this for Firefox support
45+
background: $skeleton-color-start;
4546

4647
// Prevent background color from extending to the border and overlappping
4748
background-clip: padding-box !important;

0 commit comments

Comments
 (0)