Skip to content

Fix bundled font or custom font not applied after theme switch#31591

Merged
florianduros merged 10 commits intodevelopfrom
florianduros/custom-font
Jan 5, 2026
Merged

Fix bundled font or custom font not applied after theme switch#31591
florianduros merged 10 commits intodevelopfrom
florianduros/custom-font

Conversation

@florianduros
Copy link
Copy Markdown
Member

@florianduros florianduros commented Dec 22, 2025

Close #26248 #31588

When a theme is swiched, clearCustomTheme remove all css variables. After the styles are re-applied but the custom fonts or emoji are not re-applied.

Fix #26248 #31588

When a theme is swiched, `clearCustomTheme` remove all css variables.
After the styles are re-applied but the custom fonts or emoji are not
re-applied.
Copy link
Copy Markdown
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is the best solution, removing the font only to re-add it again could result in a visual flash/flicker where we could just not remove it in the first place...

Fix #26248 #31588

When a theme is swiched, `clearCustomTheme` remove all css variables.
After the styles are re-applied but the custom fonts or emoji are not
re-applied.
This fix avoid the custom font and emoji to be removed.
@florianduros florianduros added this pull request to the merge queue Jan 5, 2026
Merged via the queue into develop with commit be7be39 Jan 5, 2026
36 checks passed
@florianduros florianduros deleted the florianduros/custom-font branch January 5, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing system brightness mode (dark=>bright or bright=>dark) makes Element forget custom set fonts

2 participants