Theming: Only color focussed widget: Difficulties with GtkListBox and multiselect

Background

I’d like to create a theme where only the currently focused element is highlighted. “Focused” here means "currently worked on by the user.

Example

Current CSS

The CSS below got me almost all the way through

selection:focus          { background: lightblue; }
*:selected:focus         { background: lightblue; }
.view:focus > *:selected { background: lightblue; } /* Special treatment for treeview */

selection  { background: beige; }
*:selected { background: beige; }

Problem

The CSS above does not work as expected for GtkListBoxes that allow multiselection. In that case only one single row will be blue.

Example

Source: gtk3-widget-factory, page 3, bottom left.

Question

What CSS could I use to make selected rows of a GtkListBox blue iff one of the other rows has the technical focus (:focus)?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.