-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Needs light mode #9
Comments
@HarshKapadia2 what do you feel about it? @sreekaransrinath, instead of adding a light mode, do you think softening the colors but retaining the mode would help? Either way, we'll have to modify css in all repositories. |
I don't mind supporting a light mode, but you're right @tusharnankani, we'll have to change the CSS, add theme switchers, check responsiveness and all of that everywhere, which will be a task. I keep thinking that we need to build some kind of a npm package or some plugin system to be able to update and keep our UI consistent across repos. I know that Razorpay does this. It will be time consuming, but it will reduce work going down the line, I guess. I've also wanted to include Web Components for repetitive things like our burger menus, because adding one page implies changing the menu HTML on every page, which is obviously irritating (OurTechCommunity/catchup#55). (Cc: @KartikSoneji) That being said though, I don't think we have the time to do any of these (add a separate theme or create a template) for now. Good suggestion though @sreekaransrinath. This will be an update that we will look to add in the future. |
How about a page-wide invert filter for everthing except images? |
Yep, possible. html {
filter: invert(1) hue-rotate(180deg);
}
img {
/* reverse the effect for images, svgs and other assets*/
filter: invert(1) hue-rotate(180deg);
} |
I think we can use the :not(img, svg) {
filter: invert(1) hue-rotate(180deg);
} |
Best. |
Good idea @KartikSoneji. Here is how it looks on our OTC home page. It seems okay to me for this page, but I haven't checked other pages. Before: After: |
Too strong colours. That’s why I said — let’s soften the colours. |
How? |
I meant the colors are too strong, a little too contrasting. |
Okay, but how do we do that without adding a lot of CSS across all our repos? |
We can add a selector like: body.invert :not(img, svg) {
filter: invert(1) hue-rotate(180deg);
} Then have the theme selector toggle the class: document.body.classList.toggle("invert"); |
Yes, but as Tushar said:
|
Side note: |
What do you think @tusharnankani?
Why not have a common CSS library in that case? |
A common library will require a full rewrite (which is not a bad thing, just not sure if we have the time for that) There should be a tool/webpack plugin to do something like that I think. |
Isn't it a temporary solution that might become permanent if we don't handle it properly? I agree that we don't have the time right now, but maybe we can start work on it and progress slowly? The light mode issue doesn't seem pressing, so maybe we can do it the correct way? I know Accessibility is important, so I'm not sure what we should do. What do you think @KartikSoneji? Should we do both? Implement the temporary solution (which will also consume time, but less of it) and start work on the common library as well (which will consume a lot of time)?
How would this thing work? |
Sorry I should have been more clear. The
|
That feels hacky. Won't we have to scrap this when implementing the common library?
How does the temporary solution lead to the final one? |
No, the idea is we replace all colors with css variables.
As the common framwork develops, more and more site-specific css can be removed. |
Okay. Please propose a plan for this, @KartikSoneji. Also, is this the correct place to discuss this or should we move this to somewhere else? If not, please propose the plan at the other place. Maybe a new issue? |
@KartikSoneji IMO temporary solutions are the most permanent one. Implementing light mode properly is what I feel is a better way to do it. |
As mentioned before, @SirusCodes:
|
Dark background + light text is not very accessible/vision-impairment friendly.
Imo we should have a light mode that people can at least shift to.
The text was updated successfully, but these errors were encountered: