https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38550

--- Comment #43 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 200765
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200765&action=edit
Bug 38550: Replace hardcoded hex with surface tokens in staff-global

The PoC patch swapped one hex literal (#E6E6E6) for a Sass variable
that resolved at compile time, leaving every other panel in the staff
client glued to a light value. This patch replaces the hex/Sass-var
references in the high-traffic staff-global.scss components with the
runtime --koha-* CSS custom properties introduced in the foundation
commit, so they re-skin in dark mode without further changes.

Components touched:

* .patroninfo (sidebar patron summary) — surface-accent + on-surface
* .sidebar_menu (admin/tools left nav) — surface-accent, surface-muted
  for nested ul / hover / active, on-surface for link text, muted text
  for the heading
* .edit-patronimage (button on patron details) — surface-accent +
  border-strong + on-surface, with hover dropping to surface-muted
* #search-facets (catalog search left rail) — surface-accent panel;
  the green h4 banner moves to brand-on so the white text stays an
  intentional choice rather than a coincidence
* #browse-return-to-results (browse-shelf return link) —
  surface-accent
* .empty (used in patron sidebar when no value is present) —
  on-surface-muted

These are the components flagged in the dark-mode review as visible
two-tone breakage points: light-grey islands stranded against dark
chrome, or black text reading 2:1 on a dark surface. After this
patch they all flip cleanly via the [data-bs-theme="dark"] toggle.

The Sass variable $default-color-grey now has no callers in
staff-global.scss; its definitions in _variables.scss and
_variables-dark.scss are left in place for any third-party
customisations that may reference them, and will be revisited in
the cleanup patch.

Test plan:
1) Apply patch, rebuild: yarn css:build
2) localStorage.setItem('theme','light'); reload — confirm patron
   sidebar (cgi-bin/koha/members/moremember.pl?…), admin sidebar
   (cgi-bin/koha/admin/admin-home.pl), search facets and browse-
   return panels look identical to pre-patch (no visual regression)
3) localStorage.setItem('theme','dark'); reload same pages — confirm
   each panel now shows a dark surface with legible text instead of
   the previous near-white island
4) On the patron page, hover/active states in the admin sidebar —
   confirm hover bg darkens (light) / lightens (dark) consistently
5) WCAG contrast check on each component in both modes — target 4.5:1
   for body text, 3:1 for large text

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to