GNOME Bugzilla – Bug 733967
provide proper pseudostates for radios and checkboxes
Last modified: 2014-08-27 19:28:54 UTC
We currently use :active for the CSS :checked state of checkboxes and radios and confusingly have :selected for CSS :active. We run into issues when a checkbox is meant to be in a treeview row, which is selected. We need to be consistent with the pseudo selectors to be able to keep the same style and behavior.
Pushed a wip/checked branch that does this and a bunch of related cleanups. Adwaita still is kinda unhappy in menus and treeviews because ".check:checked:backdrop" overrides ".menuitem.check" (higher specificity), but I guess the checkmenuitem CSS needs a ":checked" and a bunch of work anyway. The code now uses (or tries to use, assuming it's not buggy) these pseudoclasses for checkboxes, radioboxes, togglebuttons, togglecelltenderers and checkmenuitems (I hope I did not forget a widget): :checked The widget is checked, or in GTK speak, its "active" property is set. :inconsistent The widget is inconsistent, or in GTK speak, its "inconsistent" property is set. :active The widget is active (CDE called this armed). The user has pressed but not yet released the mouse button or key that activates the widget. :hover As always: The mouse is on top of the widget. There is no more :selected state.
I see this has landed. I've fixed the remaining parts. Thanks a lot, Benjamin!
Pushed a commit to GTK master to also use :checked instead of :active for expanders. The affected widgets are GtkExpander, GtkTreeView and GtkToolpalette.