Skip to content

Use CSS to detect preferred color scheme when JS is disabled#308

Merged
adityatelange merged 1 commit intoadityatelange:masterfrom
kdkasad:feature/nojs-theme-2
Mar 19, 2021
Merged

Use CSS to detect preferred color scheme when JS is disabled#308
adityatelange merged 1 commit intoadityatelange:masterfrom
kdkasad:feature/nojs-theme-2

Conversation

@kdkasad
Copy link
Copy Markdown
Contributor

@kdkasad kdkasad commented Mar 18, 2021

If the site's theme is set to auto, CSS media queries will be used to set the dark theme based on the user's browser preferences when JavaScript is disabled. No change happens if JavaScript is enabled.

Only applies if the user has disabled JS and the 'theme' configuration
parameter is set to 'auto' or is unset.
@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@adityatelange adityatelange merged commit e01b521 into adityatelange:master Mar 19, 2021
@adityatelange adityatelange added the enhancement New feature or improvement label Mar 27, 2021
kylethedeveloper pushed a commit to kylethedeveloper/hugo-PaperMod that referenced this pull request Feb 21, 2023
… theme (adityatelange#308)

- Makes auto theme work when JS is disabled
- Only applies if the 'theme' configuration parameter is set to 'auto' or is unset.
kylethedeveloper pushed a commit to kylethedeveloper/hugo-PaperMod that referenced this pull request Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants