"&" selects all parent selectors, how can I instead only select the nearest ancestor #4238
Unanswered
hawkerboy7
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
The "&" parent selector works as expected (I assume), but does not seem to be able to support the output I'd like to have instead.
Current output:
Output I'd like to get:
Is there another character or something I can change so it will only select the nearest ancestor .bar as the value instead of taking the whole tree up?
I am using this mixin, which works inside
.test--foo
, but not within.test--foo .bar
.It allows for changing the children's css based the child count.
Beta Was this translation helpful? Give feedback.
All reactions