Strange CSS error
(Sorry for the rough title, but I have no idea what the exact problem is here.)
Steps to reproduce
Apply either of the following Adwaita patches to master:
- https://gitlab.gnome.org/nana-4/gtk/-/commit/766e75f9f36b244edd251b4983eaabc8baa5385e
- https://gitlab.gnome.org/nana-4/gtk/-/commit/c5f0895ffa916857a8a79118187872b65fd26ce7
(Or https://gitlab.gnome.org/nana-4/gtk/-/commit/4004be8143bb150f8da5e1444cdc17f1df682a2c from !2499 (closed).)
Current behavior
The .linked:not(.vertical) > entry:dir(ltr):not(:last-child)
styling (which Adwaita already has) is not read in the linked first entries (but it's properly read in the linked middle entries).
Expected outcome
The CSS styling is properly read in the linked first entries.
Version information
GTK master, tested on X11 with gl/cairo/vulkan renderers
Additional information
I have no idea why this strange error happens, and why it happens only in the linked first entries, which looks like irrelevant to the changes. To me it looks like a CSS parsing error or something rather than a theme bug, but I'm not 100% sure.
I tried pasting the following CSS generated in the first patch above into the inspector (without applying those patches), but I couldn't reproduce it in this way:
notebook > header > tabs > arrow > foo:dir(ltr), windowcontrols button > foo:dir(ltr), notebook > header > tabs > arrow > foo:dir(rtl), windowcontrols button > foo:dir(rtl), button > foo:dir(ltr), button > foo:dir(rtl) { color: red; }
notebook > header > tabs > arrow > bar:dir(ltr), windowcontrols button > bar:dir(ltr), notebook > header > tabs > arrow > bar:dir(rtl), windowcontrols button > bar:dir(rtl), button > bar:dir(ltr), button > bar:dir(rtl) { color: blue; }
This could be related to :dir(ltr)
and :dir(rtl)
, because I can't reproduce it with :hover
and :active
.
In addition, this (interestingly) doesn't happen in the RTL layout.
For what it's worth, I found this issue while working on !2499 (closed).