blenderskool / untab

🔍 A productivity tool to boost your browser workflow!
https://getuntab.now.sh
MIT License
347 stars 27 forks source link

Dark mode support #11

Closed asharonbaltazar closed 3 years ago

asharonbaltazar commented 4 years ago

Dark mode (mentioned in #9 ) is now enabled via @media (prefers-color-scheme: dark). Colors will probably need to adjusted.

(I've had another pull request, but I took it down due to conflicts. Still learning Git as I go).

blenderskool commented 4 years ago

@asharonbaltazar Thank you for the PR. As I mentioned in the issue we first need to extract the colors as CSS variables to the root App component so that we don't have to add the media query to every single component to change the color.

Also, I'm wondering why the unchanged files also getting committed. Maybe look into how you are adding and committing files once again?

asharonbaltazar commented 4 years ago

Okay, but how would I be able to change the classes for the various elements?

blenderskool commented 4 years ago

@asharonbaltazar I would suggest you to take a look at CSS variables. Using that we can only change the value of variables at one place and all the styles using that variable would update automatically!

asharonbaltazar commented 4 years ago

I understand CSS variables, but how would this:

so that we don't have to add the media query to every single component to change the color.

work?

Assuming you're referring to App.svelte, how are we going to pass the variables to Input.svelte, Results.svelte, and Result.svelte, which, mind you, all use different colors?

blenderskool commented 4 years ago

@asharonbaltazar We don't have to pass the CSS variables. The variables defined in App.svelte will be automatically accessible in all the child components (as long as the CSS variables are part of the global stylesheet).

Also as you mentioned that Input.svelte, Results.svelte and Result.svelte have different colors, let me try to make them consistent so that we can have a strong light theme to start with 🙂

asharonbaltazar commented 4 years ago

Okay, easy peasy. Looking forward for those updated colors.

blenderskool commented 3 years ago

@asharonbaltazar Closing in favor of #32