Skip to content

Change header-panel-bg-hover to use var(--cpd-color-bg-action-secondary-hovered) for better custom theming#31457

Merged
t3chguy merged 5 commits intoelement-hq:developfrom
th0mcat:change_header-hover
Dec 9, 2025
Merged

Change header-panel-bg-hover to use var(--cpd-color-bg-action-secondary-hovered) for better custom theming#31457
t3chguy merged 5 commits intoelement-hq:developfrom
th0mcat:change_header-hover

Conversation

@th0mcat
Copy link
Contributor

@th0mcat th0mcat commented Dec 8, 2025

Apologies if my terminology is weird, I do not have any background in graphic design or UI/UX.

Right now, header-panel-bg-hover being set to var(--cpd-color-gray-200) messes with custom themes as any changes in the custom theme's JSON are overridden by the default value, and you get weird looking room headers on hover when colors are drastically different from the default. However, --cpd-color-gray-200's values (24,26,31 for the first-party Dark theme, and 248,249,250 for the Light theme) are exactly the same as var(--cpd-color-bg-action-secondary-hovered), so I figured that using an already existing variable that already has the correct values would keep the default themes as-is and allow more customization in custom themes. I did not change this value in the legacy themes because I did not know if those CSS files were applied or if that would break something else.

Checklist

@th0mcat th0mcat requested a review from a team as a code owner December 8, 2025 17:36
@th0mcat th0mcat requested review from dbkr and florianduros December 8, 2025 17:36
@github-actions github-actions bot added the Z-Community-PR Issue is solved by a community member's PR label Dec 8, 2025
@th0mcat th0mcat changed the title Change header-panel-bg-hover to use var(--cpd-color-bg-action-secondary-hovered) for better custom theming Change header-panel-bg-hover to use var(--cpd-color-bg-action-secondary-hovered) for better custom theming Dec 8, 2025
@florianduros
Copy link
Member

The --cpd-color-bg-action-secondary-hovered semantic is not correct for a header. There is no action. @gaelledel any idea which tokens should be used instead?

@t3chguy
Copy link
Member

t3chguy commented Dec 8, 2025

The --cpd-color-bg-action-secondary-hovered semantic is not correct for a header. There is no action. @gaelledel any idea which tokens should be used instead?

The room header is a giant button, how isn't that an action?

@florianduros
Copy link
Member

Oh sorry, i though it was the header of the room list, not the room. The token seems correct indeed but we still design approval/update on figma design

@gaelledel
Copy link

Makes sense, Ok for using bg-action-secondary-hovered

@t3chguy t3chguy added this pull request to the merge queue Dec 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 9, 2025
@t3chguy t3chguy added this pull request to the merge queue Dec 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 9, 2025
@t3chguy t3chguy added this pull request to the merge queue Dec 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 9, 2025
@t3chguy t3chguy added this pull request to the merge queue Dec 9, 2025
Merged via the queue into element-hq:develop with commit 3e928cf Dec 9, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Enhancement X-Needs-Design Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants