Skip to content

Respect and detect prefers-color-scheme: no-preference#7293

Merged
emilk merged 1 commit intomainfrom
emilk/no-theme-preference
Jul 3, 2025
Merged

Respect and detect prefers-color-scheme: no-preference#7293
emilk merged 1 commit intomainfrom
emilk/no-theme-preference

Conversation

@emilk
Copy link
Owner

@emilk emilk commented Jul 2, 2025

I don't think this will make a difference in practice, but technically there are three preference states:

  • dark
  • light
  • no-preference

Previously we would only check for dark, and if not set would assume light.
Not we also check light and if we're neither dark or light we assume nothing.

@emilk emilk added web Related to running Egui on the web eframe Relates to epi and eframe labels Jul 2, 2025
@github-actions
Copy link

github-actions bot commented Jul 2, 2025

Preview available at https://egui-pr-preview.github.io/pr/7293-emilkno-theme-preference
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@emilk emilk merged commit 40c69cd into main Jul 3, 2025
49 checks passed
@emilk emilk deleted the emilk/no-theme-preference branch July 3, 2025 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eframe Relates to epi and eframe web Related to running Egui on the web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant