Skip to content

Fix incorrect color of resource cards after changing the theme#38496

Merged
gzdunek merged 1 commit intomasterfrom
gzdunek/fix-resource-cards-theme-switching
Feb 22, 2024
Merged

Fix incorrect color of resource cards after changing the theme#38496
gzdunek merged 1 commit intomasterfrom
gzdunek/fix-resource-cards-theme-switching

Conversation

@gzdunek
Copy link
Copy Markdown
Contributor

@gzdunek gzdunek commented Feb 21, 2024

Closes #38170

It looks like there is a bug (?) in styled-components starting from v5.2.0, where replacing dynamic classes work differently than before styled-components/styled-components#3678.
Changing the theme adds a new class, so after going through dark -> light -> dark, we have two classes with the same names:
image

Using double ampersand fixed the problem. We have to backport it only to v15, in v14 we have styled components v5.1.0 which works fine.

Changelog: Fixed incorrect color of resource cards after changing the theme in Web UI and Connect.

Copy link
Copy Markdown
Contributor

@avatus avatus left a comment

Choose a reason for hiding this comment

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

Wow TIL about double ampersand. Awesome!!

@gzdunek gzdunek added this pull request to the merge queue Feb 22, 2024
Merged via the queue into master with commit 6ab8026 Feb 22, 2024
@gzdunek gzdunek deleted the gzdunek/fix-resource-cards-theme-switching branch February 22, 2024 09:21
@public-teleport-github-review-bot
Copy link
Copy Markdown

@gzdunek See the table below for backport results.

Branch Result
branch/v15 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switching between light/dark themes causes appearance issues

3 participants