A Pen by Luke Meyrick on CodePen.
Created
July 19, 2023 03:15
-
-
Save BlitzdUK/3e8a27f030590ab5c26fad29d6e7fcb9 to your computer and use it in GitHub Desktop.
Simple text glitch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| section.portfolio-experiment | |
| .experiment-title(contenteditable="true") This is cray |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $font: "Roboto", monospace; | |
| .portfolio-experiment { | |
| background: #00ffa5; | |
| color: #203e86; | |
| $steps: 50; | |
| .experiment-title { | |
| outline: none; | |
| font-size: 10vw; | |
| text-align: center; | |
| font-family: $font; | |
| min-height: 10vw; | |
| max-width: 80vw; | |
| min-width: 10vw; | |
| &, | |
| * { | |
| animation: cray 6s infinite steps($steps); | |
| display: inline-block; | |
| } | |
| } | |
| @keyframes cray { | |
| @for $i from 1 to $steps { | |
| $per: 100% / $steps * $i; | |
| $weight: ( | |
| 100, | |
| 200, | |
| 300, | |
| 400, | |
| 500, | |
| 600, | |
| 700 | |
| ); | |
| $style: ( | |
| normal, | |
| italic, | |
| normal, | |
| normal | |
| ); | |
| $decor: ( | |
| none, | |
| none, | |
| line-through, | |
| underline, | |
| none, | |
| none, | |
| none | |
| ); | |
| $trans: ( | |
| none, | |
| none, | |
| uppercase, | |
| lowercase, | |
| capitalize, | |
| none, | |
| none, | |
| none, | |
| none, | |
| none, | |
| none | |
| ); | |
| $arrayW: random(7); | |
| $arrayS: random(4); | |
| $arrayD: random(7); | |
| $arrayT: random(11); | |
| #{$per} { | |
| font-weight: nth($weight, $arrayW); | |
| font-style: nth($style, $arrayS); | |
| text-decoration: nth($decor, $arrayD); | |
| text-transform: nth($trans, $arrayT); | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link href="https://codepen.io/lukemeyrick/pen/YeexWB.scss" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment