From da7ac84acaf29db8c20c84b904d4fd3afc636088 Mon Sep 17 00:00:00 2001 From: Jacob Hagstedt Date: Tue, 15 Sep 2026 03:51:18 +0200 Subject: [PATCH] Make button labels visible on non-green buttons The global `button` rule pairs a green background with white text. Any variant that overrode the background without also setting `color` kept the white text and rendered invisible against a light background. Four controls were affected, all measured white-on-white or white-on-light-grey: the calendar header's prev/next arrows, the calendar's override-mode toggle, the red-days list's year navigation, and the modal close button. Each now declares its own `color: var(--c-text)`. Using the variable rather than a literal means the high-contrast media query in responsive.css, which redefines --c-text to #000, still applies. Also adds the hover and focus-visible states the Settings and vacation-days Save buttons were missing entirely -- they were the only green buttons in the app that did not react to the pointer. Hover is scoped with :not(:disabled) so a button disabled mid-save stays inert. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01RXMhc9nT6sNz1SL4j8dznL --- frontend/src/pages/calendar.css | 2 ++ frontend/src/styles/components.css | 38 ++++++++++++++++++++++++++++++ frontend/src/styles/modals.css | 1 + 3 files changed, 41 insertions(+) diff --git a/frontend/src/pages/calendar.css b/frontend/src/pages/calendar.css index e1ba11d..e08f5bc 100644 --- a/frontend/src/pages/calendar.css +++ b/frontend/src/pages/calendar.css @@ -16,6 +16,7 @@ min-height: 36px; padding: 8px 12px; background: none; + color: var(--c-text); border: 1px solid #d0d0d0; border-radius: 4px; font-size: 18px; @@ -373,6 +374,7 @@ border: 1px solid #d0d0d0; border-radius: 4px; background: #fff; + color: var(--c-text); cursor: pointer; font-size: 13px; transition: background-color 0.2s, border-color 0.2s, color 0.2s; diff --git a/frontend/src/styles/components.css b/frontend/src/styles/components.css index fa4b2b6..91961f1 100644 --- a/frontend/src/styles/components.css +++ b/frontend/src/styles/components.css @@ -371,18 +371,46 @@ button.ghost:hover:not(:disabled) { font-size: var(--fs-sm); } +.settings-page__button:not(:disabled):hover { + background-color: #1f5a3b; +} + +.settings-page__button:focus-visible { + outline: 2px solid var(--c-accent); + outline-offset: 2px; +} + .settings-page__button--secondary { background-color: transparent; color: var(--c-text); border: 1px solid var(--c-border); } +.settings-page__button--secondary:not(:disabled):hover { + background-color: var(--c-bg); +} + +.settings-page__button--secondary:focus-visible { + outline: 2px solid var(--c-accent); + outline-offset: 2px; +} + .settings-page__button--danger { background-color: var(--c-danger-weak); color: var(--c-danger); border: 1px solid var(--c-danger); } +.settings-page__button--danger:not(:disabled):hover { + background-color: var(--c-danger); + color: white; +} + +.settings-page__button--danger:focus-visible { + outline: 2px solid var(--c-accent); + outline-offset: 2px; +} + /* Vacation Days Table (multi-year) */ .vacation-days-table { width: 100%; @@ -434,6 +462,15 @@ button.ghost:hover:not(:disabled) { white-space: nowrap; } +.vacation-days-table__save:not(:disabled):hover { + background-color: #1f5a3b; +} + +.vacation-days-table__save:focus-visible { + outline: 2px solid var(--c-accent); + outline-offset: 2px; +} + .vacation-days-table__empty { color: var(--c-text-muted); font-size: var(--fs-sm); @@ -705,6 +742,7 @@ legend { border: 1px solid var(--c-border); border-radius: var(--radius); background-color: var(--c-surface); + color: var(--c-text); cursor: pointer; } diff --git a/frontend/src/styles/modals.css b/frontend/src/styles/modals.css index e5cd477..17b3639 100644 --- a/frontend/src/styles/modals.css +++ b/frontend/src/styles/modals.css @@ -49,6 +49,7 @@ .modal__close { background: none; border: none; + color: var(--c-text); font-size: var(--fs-lg); cursor: pointer; padding: 0;