Last active
March 22, 2021 00:58
-
-
Save Coordinate-Cat/db31fc462d9ffacc52b4e90f78645b8e to your computer and use it in GitHub Desktop.
This file contains 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
@for $i from 0 through 100 { | |
&.cell-#{$i * 5} { | |
width:round(percentage($i * 5/100)); | |
} | |
} | |
// output↓ | |
// html | |
class="cell-5" | |
class="cell-10" | |
class="cell-15" | |
class="cell-20" | |
... | |
// css | |
.cell-5 { | |
width: 5%; | |
} | |
.cell-10 { | |
width: 10%; | |
} | |
.cell-15 { | |
width: 15%; | |
} | |
.cell-20 { | |
width: 20%; | |
} | |
... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment