Zpiboo
Zpiboo
KPCKevin Powell - Community
Created by Zpiboo on 11/30/2023 in #front-end
Select a pseudo-element's "owner" (css nesting)
What? I thought you were saying there was a really hacky or just "bad" way to do it in scss (directly nested in #element::after), and that you just preferred to give an alternative in css xd
26 replies
KPCKevin Powell - Community
Created by Zpiboo on 11/30/2023 in #front-end
Select a pseudo-element's "owner" (css nesting)
I never used scss, and again I was just curious about it being possible. Anyway, thanks for the answers :D
26 replies
KPCKevin Powell - Community
Created by Zpiboo on 11/30/2023 in #front-end
Select a pseudo-element's "owner" (css nesting)
Okay
26 replies
KPCKevin Powell - Community
Created by Zpiboo on 11/30/2023 in #front-end
Select a pseudo-element's "owner" (css nesting)
Should I close the post?
26 replies
KPCKevin Powell - Community
Created by Zpiboo on 11/30/2023 in #front-end
Select a pseudo-element's "owner" (css nesting)
Yea
26 replies
KPCKevin Powell - Community
Created by Zpiboo on 11/30/2023 in #front-end
Select a pseudo-element's "owner" (css nesting)
Anyway thank y'all guys
26 replies
KPCKevin Powell - Community
Created by Zpiboo on 11/30/2023 in #front-end
Select a pseudo-element's "owner" (css nesting)
If it were just a direct child of the #element, :hover > & would've worked, I was wondering if there was a way to do that with pseudo-elements, but coming up with that wasn't a problem
26 replies
KPCKevin Powell - Community
Created by Zpiboo on 11/30/2023 in #front-end
Select a pseudo-element's "owner" (css nesting)
I'm waiting till tomorrow to mark this as solved, just in case
26 replies
KPCKevin Powell - Community
Created by Zpiboo on 11/30/2023 in #front-end
Select a pseudo-element's "owner" (css nesting)
Guess I'd just stick with that then
#element {
&::after {
/* Styles */
}
&:hover::after {
/* Styles for when #element is hovered */
}
}
#element {
&::after {
/* Styles */
}
&:hover::after {
/* Styles for when #element is hovered */
}
}
26 replies
KPCKevin Powell - Community
Created by Zpiboo on 11/30/2023 in #front-end
Select a pseudo-element's "owner" (css nesting)
It doesn't work, actually I don't think it's possible
26 replies