Created
December 10, 2019 10:43
-
-
Save devcut/9fea1efed366b40a378d55429a527b39 to your computer and use it in GitHub Desktop.
Styling elements based on sibling count
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
@for $i from 1 through 4 { | |
li:first-child:nth-last-child(#{$i}), li:first-child:nth-last-child(#{$i}) ~ li { | |
width: 100% / #{$i}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment