Repository navigation
Keep primary and destructive buttons readable on light accents - #14
Open
piotrkowski wants to merge 1 commit into
Open
piotrkowski wants to merge 1 commit into
piotrkowski wants to merge 1 commit into
Conversation
The global `button` rule clears every button's fill to give controls the terminal look: flat ground and a hairline. That includes `.suggested-action` and `.destructive-action`, but their label keeps the colour libadwaita picks for the fill, `accent_fg_color` and `destructive_fg_color`. On a light accent that colour is black, so on a dark theme the primary action reads dark on dark. Everforest, the palette in the Omarchy tests, does it to Connect an account, Save and sign in and Edit; Catppuccin's light red does the same to the delete buttons. Both get their fill back. The primary action joins the pressed and checked selectors, since inverse video is already how this stylesheet emphasises a control, and the destructive one gets the same treatment in its own colours.
piotrkowski
force-pushed
the
fix/suggested-action-contrast
branch
from
October 11, 2026 19:01
e74f5cb to
3d8f73a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The global
buttonrule setsbackground-color: transparentat APPLICATION priority, which also clears libadwaita's fill on.suggested-actionand.destructive-action. Their text color (accent_fg_color/destructive_fg_color) is left as is, so with a light accent the label is dark on dark.The Everforest palette from the
omarchy.rstests hits this:#7fbbb3is above theon_colorthreshold, so the label is black on a transparent button. It affects every primary action, e.g. Connect an account, Save and sign in, Edit.This gives both classes their fill back.
button.suggested-actionjoins the existingbutton:active, button:checkedrule, since inverse video is how the stylesheet already emphasizes a control..destructive-actiongets the same treatment in its own colors, for the same reason: a light red such as Catppuccin's#f38ba8already gets blackdestructive_fg_colorfromon_color, which is black on a transparent button. Like a checked button, a filled one keeps its fill on hover.Before / after (Everforest):
Checked with
cargo check --no-default-features,fmt --check,clippy -D warningsandtest --all-targets.