GNOME Bugzilla – Bug 722727
Widget state CSS pseudoclasses should work with adjacent selectors
Last modified: 2016-01-10 19:53:35 UTC
Created attachment 266923 [details] Minimal example The documentation says "Widget state pseudoclasses may only apply to the last element in a selector." However, it would be nice if this were not the case, for two reasons: 1) it is legal CSS. 2) since GTK 3.10 widget states don't propagate to child widgets, so if you want to select a GtkImage inside a prelit GtkButton you have to manually propagate the state flags, which is annoying. The attached minimal example illustrates the problem: the desired behavior is that the icon inside the "I should turn red" button turns red on mouse-over. The "I do turn red" button illustrates the current way of implementing that behavior.
legal or not, the challenge is to implemet it...
*** Bug 660489 has been marked as a duplicate of this bug. ***
this works now
Cool! I'm really excited about this one.
Reopening since it doesn't work with adiacent selectors, e.g. .entry:focus + .button {}
This seems to work correctly now. I've added a test that verifies this. If you see something else thats not working, adding a similar test would be great.