Skip to content

Commit

Permalink
Tidying up the gradient and animation. Thanks, Ryan.
Browse files Browse the repository at this point in the history
  • Loading branch information
daveyholler committed Mar 21, 2019
1 parent dd8d320 commit f1f29ab
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/components/loading/_loading_content.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$gradientStartStop: shadeOrTint($euiColorLightShade, 0%, 15%);
$gradientMiddle: shadeOrTint($euiColorLightestShade, 0%, 5%);
$gradientStartStop: shadeOrTint($euiColorLightestShade, 8%, 12%);
$gradientMiddle: shadeOrTint($euiColorLightestShade, 2%, 4%);

.euiLoadingContent__loader {
width: 100%;
Expand All @@ -10,17 +10,14 @@ $gradientMiddle: shadeOrTint($euiColorLightestShade, 0%, 5%);
margin-bottom: $euiSizeS;
border-radius: $euiBorderRadius;
width: 100%;
background-size: 400% 100% !important; // sass-lint:disable-line no-important
background-position: 0% 0%;
background-size: 200% 100% !important; // sass-lint:disable-line no-important
background: linear-gradient(
90deg,
$gradientStartStop 0%,
$gradientStartStop 25%,
$gradientMiddle 50%,
$gradientStartStop 75%,
$gradientStartStop 100%,
to right,
$gradientStartStop 8%,
$gradientMiddle 18%,
$gradientStartStop 33%,
);
animation: GradientLoad 1s $euiAnimSlightResistance infinite;
animation: GradientLoad 1.5s $euiAnimSlightResistance infinite;

&:last-child:not(:only-child) {
width: 75%;
Expand All @@ -33,6 +30,7 @@ $gradientMiddle: shadeOrTint($euiColorLightestShade, 0%, 5%);
}

100% {
background-position: 0% 0%;
background-position: -100% 0%;
}
}

0 comments on commit f1f29ab

Please sign in to comment.