Skip to content

panel: fix order of css rules - #590

Open
trigg wants to merge 2 commits into
masterfrom
icon-default-fixup
Open

trigg wants to merge 2 commits into
masterfrom
icon-default-fixup

Conversation

@trigg

@trigg trigg commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

So initially we can fix this by moving the default rule sooner, but this needs more specificity to ensure it doesn't creep back.

For now, proof of point

@trigg

trigg commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

To my testing, this fixes #571 and #528

@trigg

trigg commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

For anyone curious, my testing showed that GTK handles CSS incorrectly if you're adding multiple stylesheets at the same priority.

It loops over each style sheet at the same priority but doesn't merge them, instead takes the matching values from the last-added stylesheet that has a match at all.

So image was winning over image.class despite CSS spec saying the higher specificity of the latter means it is chosen, but only when the stylesheet it was in was loaded after.

The fix is to merge all the CSS Config classes into one style sheet and update it all together, forcing CSS specificity to be respected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant