Skip to content

[BootstrapAdminUi] Fix ghost secondary buttons hover in dark mode - #406

Merged
loic425 merged 1 commit into
Sylius:mainfrom
camilleislasse:fix/ghost-secondary-hover
Nov 12, 2026
Merged

loic425 merged 1 commit into
Sylius:mainfrom
camilleislasse:fix/ghost-secondary-hover

Conversation

@camilleislasse

Copy link
Copy Markdown
Contributor
Q A
Branch? main
Bug fix? yes
New feature? no
BC breaks? no
License MIT

In dark mode, hovering a .btn-ghost-secondary turns it into a light grey pill with a near-white icon, which makes the icon disappear. It affects the theme switcher, the pagination dropdown toggle and the copy-to-clipboard buttons.

Tabler resolves --tblr-secondary-fg at build time from the light theme $secondary, then remaps --tblr-secondary to a light grey in dark mode without recomputing it. The hover now uses --tblr-active-bg instead, the same surface as .btn-action:hover, so the button stays a ghost.

Contrast on hover goes from 1.43:1 to 8.97:1 in dark mode, and from 1.99:1 to 14.22:1 in light mode. Nothing changes at rest.

public/ assets were rebuilt with yarn build.

Dark Light
Ghost secondary button states in dark mode Ghost secondary button states in light mode

@loic425
loic425 merged commit 01680b3 into Sylius:main Nov 12, 2026
5 checks passed
TheMilek added a commit to Sylius/Sylius that referenced this pull request Nov 12, 2026
| Q               | A
|-----------------|-----
| Branch?         | 2.3
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | same fix as Sylius/Stack#406
| License         | MIT

## Description

In dark mode, hovering a `.btn-ghost-secondary` turns it into a light
grey pill with a near-white icon, which makes the icon disappear. It
affects the theme switcher and the pagination dropdown toggle.

Tabler resolves `--tblr-secondary-fg` at build time from the light theme
`$secondary`, then remaps `--tblr-secondary` to a light grey in dark
mode without recomputing it. The hover now uses `--tblr-active-bg`
instead, the same surface as `.btn-action:hover`, so the button stays a
ghost.

Contrast on hover goes from 1.43:1 to 8.97:1 in dark mode, and from
1.99:1 to 14.86:1 in light mode. Nothing changes at rest.

| Dark | Light |
|------|-------|
| <img width="400" alt="Ghost secondary button states in dark mode"
src="https://github.com/user-attachments/assets/5c05139d-98c6-4a44-afcf-28be336f1b3d"
/> | <img width="400" alt="Ghost secondary button states in light mode"
src="https://github.com/user-attachments/assets/b5775700-2b16-48d2-9cae-bb82268ca1b1"
/> |
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.

2 participants