Skip to content

Instantly share code, notes, and snippets.

@freshyill
Created March 21, 2021 06:01
Show Gist options
  • Save freshyill/f3a40c20ff2c39c0035fe0a973f8fd64 to your computer and use it in GitHub Desktop.
Save freshyill/f3a40c20ff2c39c0035fe0a973f8fd64 to your computer and use it in GitHub Desktop.

Revisions

  1. freshyill created this gist Mar 21, 2021.
    22 changes: 22 additions & 0 deletions input.scss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    $count: 8;

    @for $i from 1 through $count {

    @keyframes logo#{$i} {
    @if $i != 1 {
    from {
    opacity: 0;
    }
    }

    #{(100% / $count) * $i - (100 / $count)} {
    opacity: 1;
    }

    #{(100% / $count) * $i} {
    opacity: 0;
    }

    }
    }

    85 changes: 85 additions & 0 deletions output.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,85 @@
    @keyframes logo1 {
    0% {
    opacity: 1;
    }
    12.5% {
    opacity: 0;
    }
    }
    @keyframes logo2 {
    from {
    opacity: 0;
    }
    12.5% {
    opacity: 1;
    }
    25% {
    opacity: 0;
    }
    }
    @keyframes logo3 {
    from {
    opacity: 0;
    }
    25% {
    opacity: 1;
    }
    37.5% {
    opacity: 0;
    }
    }
    @keyframes logo4 {
    from {
    opacity: 0;
    }
    37.5% {
    opacity: 1;
    }
    50% {
    opacity: 0;
    }
    }
    @keyframes logo5 {
    from {
    opacity: 0;
    }
    50% {
    opacity: 1;
    }
    62.5% {
    opacity: 0;
    }
    }
    @keyframes logo6 {
    from {
    opacity: 0;
    }
    62.5% {
    opacity: 1;
    }
    75% {
    opacity: 0;
    }
    }
    @keyframes logo7 {
    from {
    opacity: 0;
    }
    75% {
    opacity: 1;
    }
    87.5% {
    opacity: 0;
    }
    }
    @keyframes logo8 {
    from {
    opacity: 0;
    }
    87.5% {
    opacity: 1;
    }
    100% {
    opacity: 0;
    }
    }
    9 changes: 9 additions & 0 deletions settings.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    {
    "sass": {
    "compiler": "dart-sass/1.26.11",
    "extensions": {},
    "syntax": "SCSS",
    "outputStyle": "expanded"
    },
    "autoprefixer": false
    }