Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

refactor(svelte): Reduce logo complexity#64274

Merged
fkling merged 1 commit into
mainfrom
fkling/sk/svg-dark-light
Aug 5, 2024
Merged

refactor(svelte): Reduce logo complexity#64274
fkling merged 1 commit into
mainfrom
fkling/sk/svg-dark-light

Conversation

@fkling

@fkling fkling commented Aug 5, 2024

Copy link
Copy Markdown
Contributor

There is no need to have a separate image file for dark mode. The SVG file can handle color switching itself.

Test plan

Switched theme in the user menu and in the browser dev tools.

There is no need to have a separate image file for dark mode. The SVG
file can handle color switching itself.
@fkling fkling requested a review from camdencheek August 5, 2024 15:14
@cla-bot cla-bot Bot added the cla-signed label Aug 5, 2024
Comment on lines +7 to +11
@media (prefers-color-scheme: dark) {
:root {
--text-color: #fff;
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we set this when a user switches manually between light and dark? I was thinking this was just reading the OS theme

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't know how it works but it indeed worked when I switched manually.

@camdencheek camdencheek Aug 5, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was uncomfortable not knowing how this works, so did some digging and found that applying .theme-light or .theme-dark also sets color-scheme, which is respected by prefers-color-scheme

@camdencheek camdencheek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved pending question

@fkling fkling merged commit 4e5ea2a into main Aug 5, 2024
@fkling fkling deleted the fkling/sk/svg-dark-light branch August 5, 2024 16:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants