Last active
January 11, 2018 08:54
-
-
Save Beraliv/a95f449d4e96565b1a92a14961411ecb to your computer and use it in GitHub Desktop.
Less patterns
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
/* different parameters based on number of elements */ | |
.selector:nth-last-child(2):first-child { | |
&, & ~ .selector { | |
// setting parameter, i.e.: flex-basis: 50%; | |
} | |
} | |
.selector:nth-last-child(3):first-child { | |
&, & ~ .selector { | |
// setting parameter, i.e.: flex-basis: 33.33%; | |
} | |
} | |
.selector:nth-last-child(4):first-child { | |
&, & ~ .selector { | |
// setting parameter, i.e.: flex-basis: 25%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment