Last active
August 29, 2015 14:13
-
-
Save craigbutcher/99d75bcd6176230cab77 to your computer and use it in GitHub Desktop.
Commenting System Boxes Styling using SASS
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
// This is for the commenting system where we can tell SASS to run 'for' loop from 1 to variable $rows | |
// Using nth-child + margin-left to set the styling | |
// Stylus version coming soon(!) | |
// Variable | |
$rows: 10; | |
// For loop | |
@for $i from 1 through $rows { | |
&:nth-child(#{$i}) { | |
margin-left: (( 20 / $rows) * $i) * 5px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment