Created
May 14, 2015 15:04
-
-
Save ifthenelse/639d207aab96b3e0e9bb to your computer and use it in GitHub Desktop.
Dynamically set inline-block elements equal width based on items length
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 1 through 10 { | |
/* #{$i} item(s) */ | |
.box-ballooned-item:first-child:nth-last-child(#{$i}), | |
.box-ballooned-item:first-child:nth-last-child(#{$i}) ~ .box-ballooned-item { | |
max-width: floor(100% / $i); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment