Skip to content

Commit

Permalink
fix(_loading.scss): change mixin to template, remove margin
Browse files Browse the repository at this point in the history
  • Loading branch information
carsoli committed Dec 7, 2023
1 parent 04de90d commit 4ce41c9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/kotti-ui/source/kotti-style/_loadings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,42 @@
}
}

@mixin skeleton-style($bg-x, $bg-y) {
%skeleton-style {
box-sizing: border-box;
display: block;
width: 100%;
margin: 0.4rem 0;
line-height: 1px;
background: linear-gradient(
to left,
$lightgray-300 0%,
$lightgray-400 50%,
$lightgray-300 100%
);
background-size: $bg-x $bg-y;
border-radius: 2px;
animation: 2s ease-out infinite skeleton-loading;
}

.skeleton {
&.circle {
@include skeleton-style(1000px, 1000px);
@extend %skeleton-style;

padding-top: 100%;
background-size: 1000px 1000px;
border-radius: 100%;
}

&.square {
@include skeleton-style(1000px, 1000px);
@extend %skeleton-style;

padding-top: 100%;
background-size: 1000px 1000px;
}

&.rectangle {
@include skeleton-style(1800px, 1200px);
@extend %skeleton-style;

height: 0.4rem;
background-size: 1800px 1200px;

&.sm {
height: 0.4rem;
Expand Down

0 comments on commit 4ce41c9

Please sign in to comment.