Skip to main content
3 events
when toggle format what by license comment
Feb 2 at 19:33 comment added udbhav shrivastava First of all I want to really thank you for helping me discover this amazing property. After like some tinkering, I managed to make a sorta lighter version of this where It just relies on the classname with no id required. If we just use the class names the last part should look like this body:has(.box1:hover) .box2 { background: blue; } /* when div2 is hovered make div1 purple */ body:has(.box2:hover) .box1 { background: purple; } I would love to know the support/reliablity of doing it like this though !
Mar 28, 2023 at 6:02 comment added Abdul Aziz Barkat Note: The user must explicitly set the layout.css.has-selector.enabled preference to true for this to work with Firefox.
Dec 15, 2022 at 19:20 history answered Temani Afif CC BY-SA 4.0