Skip to content
This repository has been archived by the owner on Sep 4, 2022. It is now read-only.

Create light mode switch #43

Open
lostdesign opened this issue Jun 15, 2019 · 18 comments
Open

Create light mode switch #43

lostdesign opened this issue Jun 15, 2019 · 18 comments
Labels
good first issue 🥇 Good for newcomers help wanted 🆘 Extra attention is needed new feature ✨ requesting new feature

Comments

@lostdesign
Copy link
Owner

Use CSS root var to swap app theme

@lostdesign lostdesign created this issue from a note in Todo (Ideas) Jun 15, 2019
@lostdesign lostdesign added good first issue 🥇 Good for newcomers help wanted 🆘 Extra attention is needed new feature ✨ requesting new feature and removed enhancement labels Jul 9, 2019
@lostdesign lostdesign pinned this issue Jul 17, 2019
@SarathSantoshDamaraju
Copy link

Hi @lostdesign
if it is still in plan, Can I take this up ?

@lostdesign
Copy link
Owner Author

Hi @SarathSantoshDamaraju, you can sure take this up yeah! Maybe sync with @Shiroraven as he also proposed something on the discord server.

@SarathSantoshDamaraju
Copy link

SarathSantoshDamaraju commented Aug 22, 2019

@lostdesign Cant find him on devcord channel (am i checking at a wrong place?). I will start working on it till he replies here and we can cor-ordinate on this thread.

@Shiroraven
Copy link

Hey, @SarathSantoshDamaraju thanks for showing interest in helping out, I left devcord quite a while ago due to personal reasons. You can contact me on Discord using my tag Shiroraven#4302 or just work from this thread. 👍

@SarathSantoshDamaraju
Copy link

SarathSantoshDamaraju commented Aug 22, 2019

Can we use this thread ? and do you have thoughts on this theme switcher as @lostdesign mentioned?

@Shiroraven
Copy link

While possible, i would recommend against it because alot of developers are getting notified about every action that happens here.

For now i just created a component for the actual switch as a concept.
Screenshot (19)
Screenshot (20)

@Shiroraven
Copy link

I'm currently trying to figure out the best way to change the CSS upon switching the theme, maybe adding a class of .light or .dark to the body would work?

@SarathSantoshDamaraju
Copy link

Sure.

And only .light class would do as dark theme is by default. And can be accomplished with few style changes. Just for reference I made a quick edit in browser.
Screenshot 2019-08-22 at 4 16 40 PM

I assume you can complete this. let me know otherwise.

@Shiroraven
Copy link

looks good! We have to make sure to replace the blue parts though due to contrast

@Shiroraven
Copy link

also we need the webgems logo cleaned up

@Shiroraven
Copy link

i can push my switch component and you can tinker around with the css if you want
should be done then?

@SarathSantoshDamaraju
Copy link

Sure

@SarathSantoshDamaraju
Copy link

@Shiroraven Let me know after pushing the component

@Hammster
Copy link

Hammster commented Oct 13, 2019

Just want to also propose to make use of the prefers-color-scheme media query.

@media (prefers-color-scheme: dark) {

}

@media (prefers-color-scheme: light) {

}

And make adjustments to the theme-color meta tag currently it's set to #FFFFFF

@hsh2001
Copy link

hsh2001 commented Oct 22, 2019

<!-- dark mode -->
<link rel="stylesheet"
      href="dark.css"
      media="(prefers-color-scheme: dark)">

<!-- light mode -->
<link rel="stylesheet"
      href="light.css"
      media="(prefers-color-scheme: light)">

This code will help, too.

@lostdesign
Copy link
Owner Author

@SarathSantoshDamaraju @Shiroraven any updates on this?

@lostdesign lostdesign added this to Ready For Dev in ISSUES Nov 18, 2019
@mallikarjun2000
Copy link

Hello, can I work on this issue?

@nguyenphungsang
Copy link

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue 🥇 Good for newcomers help wanted 🆘 Extra attention is needed new feature ✨ requesting new feature
Projects
ISSUES
  
Ready For Dev
Todo
  
Ideas
Development

No branches or pull requests

7 participants