fix(theme): destructive buttons were invisible after #98 (1.03:1)
All checks were successful
Check / eval (push) Successful in 3m54s
All checks were successful
Check / eval (push) Successful in 3m54s
e9dd3d1 pinned dialog button labels to base00 for dark palettes. That is
correct for suggested-action, whose background adw-gtk3 builds opaquely as
mix(white,@accent_bg_color,0.9) — but destructive-action is the one class
whose background is derived from currentColor:
background-color: mix(@destructive_color, alpha(currentColor, 0.15), 0.9)
so pinning the label dragged the background down with it. On Boreal the
"Delete" button of a GtkMessageDialog rendered #21272F on #252931 —
1.03:1, invisible — and light palettes hit the same 1.03:1. The most
safety-critical button in a confirmation dialog was the one that vanished.
Pin the destructive background to the same opaque pastel ladder
suggested-action uses. Enabled-only (:not(.flat):not(:disabled)): the
sheet's disabled chrome already renders legibly and must keep it.
Boreal 1.03 -> 6.19:1, summer-day 1.03 -> 2.74:1 (= upstream's
white-on-accent convention; the residual light-mode weakness is #130).
V2: GtkMessageDialog rendered under the real HM session and viewed —
boreal before/after, summer-night (whole-swap), summer-day (light).
Scripted checks stayed green throughout and never saw this; only the
render did. Follow-ups #129 (permanent guard) and #130 filed.
This commit is contained in:
@@ -117,12 +117,31 @@ in
|
||||
color: alpha(#${base16.base05}, 0.5);
|
||||
}
|
||||
/* Suggested/destructive sit on pastel accent/bad — dark label
|
||||
is intentional and contrast-checked (~4:1 on Boreal accent). */
|
||||
is intentional and contrast-checked (7.0:1 suggested, 6.2:1
|
||||
destructive on Boreal). */
|
||||
button.suggested-action, button.suggested-action label,
|
||||
button.destructive-action, button.destructive-action label,
|
||||
button.default, button.default label {
|
||||
color: #${base16.base00};
|
||||
}
|
||||
/* adw-gtk3 builds ONLY the destructive background from
|
||||
currentColor — mix(@destructive_color, alpha(currentColor,…)) —
|
||||
where suggested-action uses an opaque mix(white,@accent_bg…).
|
||||
So pinning the label above drags the background down with it
|
||||
and the button renders dark-on-dark (1.03:1, invisible). Pin
|
||||
the background to the same opaque pastel ladder suggested-action
|
||||
uses. Enabled only: :disabled keeps the sheet's dark chrome and
|
||||
already renders legibly. */
|
||||
button.destructive-action:not(.flat):not(:disabled) {
|
||||
background-color: mix(white, @destructive_bg_color, 0.9);
|
||||
}
|
||||
button.destructive-action:not(.flat):not(:disabled):hover {
|
||||
background-color: mix(white, @destructive_bg_color, 0.85);
|
||||
}
|
||||
button.destructive-action:not(.flat):not(:disabled):active,
|
||||
button.destructive-action:not(.flat):not(:disabled):checked {
|
||||
background-color: mix(white, @destructive_bg_color, 0.7);
|
||||
}
|
||||
button.suggested-action.flat, button.suggested-action.flat label {
|
||||
color: #${base16.base0D};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user