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
[Feature] Dark mode support #2342
Comments
First time I hear of this media feature. Interesting. |
Its pretty cool! Here is an example implementation https://kevinchen.co/blog/support-macos-mojave-dark-mode-on-websites/ |
Any updates about this ? 😄 |
Will contribute if someone made this |
It seems to need javascript support so will not be suitable for bulma until it gets usable without javascript. |
@hubbyist Are you sure it needs JS support? |
@hubbyist this uses CSS media-query's so no JS required. Not all browsers support it quite yet but Safari and Chrome have support in their beta channels. |
current situation is as follows. https://caniuse.com/#search=prefers-color-scheme |
But a dark variant of bulma with be variables bound color scheme support may be better. It can be transformed to use prefers-color-scheme later when browser support is more common. |
I think a good resource with already some nice dark themes for Bulma is: https://jenil.github.io/bulmaswatch/ |
I've started a PR over on #2425 however thinking about it more perhaps this is better suited as an extension to Bulma? As I'm currently doing it it forces it upon anyone who uses Bulma with users that ask for dark mode. |
Little Update on this issue : Firefox just shipped the support for prefers-color-scheme in Firefox 67 https://caniuse.com/#search=prefers-color-scheme |
I ended up creating an extension for Bulma as the discussion in #2425 concluded that having it as part of base Bulma could be confusing. I need to update it for the latest version but it works! https://github.com/jloh/bulma-prefers-dark |
Perhaps this technique is an option: https://medium.com/@katiemctigue/how-to-create-a-dark-mode-in-sass-609f131a3995 If I understand it correctly Bulma could ship with a light theme only, eliminating the objections in this thread, while offering the flexibility to easily add a dark-mode or other additional themes for those who want it. |
With the release 0.8.0 I try implement a ligth-dark-mode button toggle. |
Yeah CSS variables is the way. But it's not easy to add CSS variables to Bulma while maintaining backwards compatibility with all current Bulma setups. I'm currently working on it but it's harder than it sounds. See #1837 |
@jgthms What you think about this path?
Is it complicated to generate this CSS with SASS? |
See my take on it here: #1837 |
Any update on this? |
Did code a working solution for the Dark Mode. Try demo in here: Works with basic CSS variables + short JavaScript. Can be used inside existing CSS style file. Can be used to define multiple color themes in one CSS file. No user logins or profiles required. Will save our eyesight at night :-) Have fun using my code ! |
I've been working on an advanced CSS Variables for Bulma. It's not the simplest option but it's the most flexible one. See: https://twitter.com/jgthms/status/1248169933843898370 |
@jgthms Hope to use this amazing feature in the further release. 😆 Quite need this feature. |
@jgthms Any updates? Many people wait for this feature. 🙏 |
Can't wait for this. I've been "maintaining" my own dark theme and it's becoming unmaintainable, cuz i've no idea how to properly implement and maintain 2 different themes 😩 |
This is definetly possible using pure css only, as shown here https://codepen.io/oahehc/pen/OJPjZXB but it require some deep rework to be implemented nicely. |
OK, if the pages do not reload and there are no links between visits. Otherwise the CSS rule for prefers-color-scheme :dark might be more OK as a static option with almost dark or dark grey colors. CSS really needs rules for the night time, but they do not exist. |
What is the official stance on whether or not this will eventually be looked into? It's entirely fine if the Bulma team decides they don't want to support a dark-theme, but it'd be great to communicate it, if that's the case. There are so many different (incomplete?) approaches presented in this issue, I'm entirely lost. |
In 2 months' time, this feature request will be |
I ended up adding a package NextThemes (I use NextJS) that helps with the local storage persistence of the user theme pref and does the
However, I totally agree with everyone here that it needs to be part of the CSS framework. Themes and modes are totally essential these days. I was reading @jgthms comment on the original PR from @jloh and Jeremy mentions that "most websites won’t or don’t need a dark theme" and "it should exist as an extension". If this thought still resonates then I think it is better we close this Issue and indicate the resolution, rather than misleading the users. |
Hmm, still no update on that? As it is solo CSS and everything is almost given in bulma by design, I can't get it :-/ |
Yet another try to have dark mode (and more choices for colors directly on CDN): https://htmlpreview.github.io/?https://github.com/codomatech/bulma50shades/blob/main/demo/index.html The main repo is here Feedback is welcome of course! |
@jgthms can we get a status update on this? It's been 4 years now, what's missing and how can people help to get this across the finish line? |
To me, it looks like the only option acceptable to all would be to build 3 distributions of Bulma:
Advantages:
|
Would like to follow this! |
Looking forward to something here. |
Bulma is many people's favorite! The dark mode is becoming more popular nowadays. I wonder what is the to implement the dark mode support? This issue was opened almost 4 years back. |
There are many dark bulma variants out there, I especially like the bulma-swatch themes by Jenil Gogari. Then you could do, if you have a light theme by default, and a dark variant by user preference, for example:
|
We cannot import the bulmawatch, the project is heavily customized and messes up everything. The ideal scenario is to use the dark theme from the sass variables. |
With 174 open PRs (the 212 open issues don't really count, actually), Bulma seems to not be very active anymore 😢 |
I agree. It is sad, however. I think there is still a huge need that bulma tries to provide. A css only framework, not a utility and super good defaults. :( |
lfg |
!!! |
Thanks @jgthms |
It'd be awesome if Bulma supported the
@media (prefers-color-scheme: dark)
media-query out of the box!I'm aware this would require two whole colour pallet/themes so understand if this is more suited for a theme/port of Bulma!
The text was updated successfully, but these errors were encountered: