How to change dark mode as default in mobile environment? #670
-
Hello. First of all, much appreciate for great template. I changed the default page as dark mode in desktop, but it did not apply in mobile. What file should I modify to change the mobile environment? |
Beta Was this translation helpful? Give feedback.
Answered by
rohandebsarkar
May 16, 2022
Replies: 2 comments 4 replies
-
Change the following line Line 55 in f7274c0 to: if ((userPref && userPref('(prefers-color-scheme: dark)').matches) || userPref('(max-width: 768px)').matches) {
This will set a default dark theme for mobile and tablet devices. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
SHC02
-
@SHC02 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change the following line
al-folio/assets/js/theme.js
Line 55 in f7274c0
to:
if ((userPref && userPref('(prefers-color-scheme: dark)').matches) || userPref('(max-width: 768px)').matches) {
This will set a default dark theme for mobile and tablet devices.