Reputation: 375
Here's my current code:
.loken5 *
padding-right: 5px
.loken5:last-child
padding: 0
Is there any way in SASS that I can use just 1 '.loken5' tag? (purpose is for saving space). Thank you :)
Upvotes: 0
Views: 164
Reputation: 2018
Sass:
.loken5
&:last-child
padding: 0
*
padding-right: 5px
Scss:
.loken5 {
&:last-child {
padding: 0;
}
* {
padding-right: 5px;
}
}
If you want .loken5 *:last-child
:
.loken5
*
padding-right: 5px
&:last-child
padding: 0
Checkout this article if you want to know more about the &
(SASS ampersant)
Upvotes: 2