Skip to content

Commit

Permalink
Merge pull request #1489 from scireum/feature/mko/OX-11681
Browse files Browse the repository at this point in the history
Adds sci-preloader-small
  • Loading branch information
mko-sci authored Dec 10, 2024
2 parents 06e9569 + 571f4e5 commit de15b5b
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions src/main/resources/assets/design-system/misc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,12 @@
}

.sci-preloader {
--preloader-size: calc(3 * var(--sci-base-unit)); /* Default size */
--preloader-border-width: calc(var(--preloader-size) * (0.2 / 3));

position: relative;
height: calc(3 * var(--sci-base-unit));
width: calc(3 * var(--sci-base-unit));
height: var(--preloader-size);
width: var(--preloader-size);
}

.sci-preloader::before {
Expand All @@ -307,16 +310,22 @@
position: absolute;
top: 50%;
left: 50%;
width: calc(3 * var(--sci-base-unit));
height: calc(3 * var(--sci-base-unit));
margin-top: calc(-1.5 * var(--sci-base-unit));
margin-left: calc(-1.5 * var(--sci-base-unit));
width: var(--preloader-size);
height: var(--preloader-size);
margin-top: calc(-1 * var(--preloader-size) / 2);
margin-left: calc(-1 * var(--preloader-size) / 2);
border-radius: 50%;
border-top: calc(0.2 * var(--sci-base-unit)) solid $sirius-gray;
border-right: calc(0.2 * var(--sci-base-unit)) solid transparent;
border-top: var(--preloader-border-width) solid $sirius-gray;
border-right: var(--preloader-border-width) solid transparent;
animation: sciPreloader 1s linear infinite;
}

.sci-preloader-small {
--preloader-size: calc(2 * var(--sci-base-unit)); /* Smaller size */
/* No need to redefine --preloader-border-width; it adjusts automatically */
}


@keyframes sciPreloader {
to {
transform: rotate(360deg);
Expand Down

0 comments on commit de15b5b

Please sign in to comment.