Is nesting necessary in some situations? #230
Unanswered
dominikgorczyca
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
-
For example, let's say we have button with an icon in it. When we
hover
the button I want the icon to change the color so I would need something like this:If I just added the styles to the icon itself, hovering the button won't work but I guess you could add
:hover
to.icon
and call it a day. There's a problem with it though, because I cannotfocus
on icon I indeed need to style thebutton:focus .icon
to apply styles to the.icon
.Is there a way to avoid this or is this one of the exceptions where you can use nesting?
Do you use Javascript for such thing?
Beta Was this translation helpful? Give feedback.
All reactions