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
Dark mode #1861
Comments
You're right. There is no specific dark mode in Buefy right now. |
@3rdSenna Bulma author is working on it, stay tuned!! |
Nice, great news! Is it tracked in a version or branch somewhere? Care to link? Want to watch it. |
I am waiting for it too :) Just like @3rdSenna , i saw it already on Vuetify and would love to have this feature in Buefy too! 🚀 |
Would absolutely be nice to see a builtin dark mode implemented :-) |
Perhaps this issue can be closed as it is a duplicate of #2076. Once the PR for it is merged, the variables can be configured as documented here https://bulma.io/2019/10/15/light-dark-colors/#scheme-variables-for-dark-mode. |
@a-kriya I don't think we'll able to get a dark mode like Vuetify |
Which is okay since Bulma doesn't do it that way. It would be a fairly large deviation from Bulma if Buefy were to implement dark modes for individual components like Vuetify. If this ticket is marked as a feature request, is that something you're considering? |
No, probably when bulma is going to release CSS variables feature, do you know other way? |
Nope. Either way, it's dependent on Bulma. I'm trying to see what can be done under this ticket. |
Basically, would it help clean up tickets here by direct users to Bulma's issues section if a feature/fix must come from there? |
Is there an open issue? |
Not exactly, but jgthms/bulma#2342 along with jgthms/bulma#1837 would be close. Regardless, if there are tickets here which cannot really be addressed without underlying support from Bulma, should they not be moved to that repo? |
Hello! I saw in jgthms/bulma#2342 a recent comment by jgthms: jgthms/bulma#2342 (comment) . Would that help you closing this issue? (anyway, kudos for all the good work ❤️ ❤️ ) |
@mapellidario all depends on Bulma otherwise I should add an external to provide it. What would you do ? |
Waiting an official way, take a look at https://buefy.org/extensions/bulmacssvars |
My PR would solve the issue of individual component themes and toggling by a simple data attribute jgthms/bulma#2981 |
ops, its 2021 and dark mode still not added? |
Be careful, 2020 isn't finished yet 😏 |
Oh nice, I about to create a project using Buefy, hoping I can use it In the future. :) |
I did this in my project using bulma css vars and Nuxt color mode. It's a workaround, of course, but it reached my goal while we don't have dark mode natively in buefy. |
@jtommy is there any progress with this issue? |
No, the only available options are already discussed in the previous messages. |
@joaopedroAnelli could you share your config and sass files? I can't get it to work. |
ColorsHere are the colors I used to make
Setup
//Must be CommonJS export
module.exports = {
colorDefs: { //This will default to dark mode (Update with light mode colors to default to light mode)
'scheme-main': '#1a1a1a',
'scheme-invert': '#000000',
'text': '#b5b5b5',
'text-invert': '#c9c9c9'
},
cssFallbackOutputFile: './src/bulma-generated/generated-fallbacks.css',
jsOutputFile: './src/bulma-generated/bulma-colors.js', //Change to ".ts" to make output TypeScript
sassEntryFile: './src/style/main-sass-file.sass', //This file needs to exist before you run the bulma-css-vars command
sassOutputFile: './src/bulma-generated/generated-vars.sass',
transition: '0.5s ease'
};
//Import order matters
@import './bulma-generated/generated-fallback.css';
@import './bulma-generated/generated-vars.sass';
@import '../node_modules/bulma-css-vars/bulma-cv-lib';
node ./node_modules/bulma-css-vars/bin/bulma-css-vars.js
A few very important things:
|
Thanks for your detailed answer, I have one problem however. If I also set the primary color in the But it is not applied for sliders and a lot of other ui elements and selections etc. Do you have any advice on this? // Must be CommonJS export
module.exports = {
// This will default to dark mode (Update with light mode colors to default to light mode)
colorDefs: {
primary: '#0d5d6a',
'primary-light': '#4da9b8',
'primary-dark': '#091a28',
'scheme-main': '#1a1a1a',
'scheme-invert': '#000000',
text: '#b5b5b5',
'text-invert': '#c9c9c9',
},
cssFallbackOutputFile: './bulma-generated/generated-fallback.css',
jsOutputFile: './bulma-generated/bulma-colors.ts', // Change to ".ts" to make output TypeScript
sassEntryFile: './assets/main.scss', // This file needs to exist before you run the bulma-css-vars command
sassOutputFile: './bulma-generated/generated-vars.sass',
transition: '0.5s ease',
options: { implementation: require('sass') },
} |
@joeyboey Try setting the primary colors in the entry SCSS file ( //Customize global theme
$primary: #0d5d6a;
$primary-light: #4da9b8;
$primary-dark: #091a28;
//Import order matters
@import './bulma-generated/generated-fallback.css';
@import './bulma-generated/generated-vars.sass';
@import '../node_modules/bulma-css-vars/bulma-cv-lib'; This should work (It's what I did for wakefulcloud.me), but, you won't be able to dynamically change the primary color anymore. You could also try identifying the exact (primary) color of the components you'd like to change using your browser's inspector, convert that color from hex to hsl, then search for it on Bulma's variable documentation, then finally add whatever variable you found to |
Thanks a lot for your tips again. I had the order flipped.. |
If none of the above work, you may want to open an issue with Bulma itself. |
The lack of a dark mode button to toggle the docs is what made me not use this library. |
Hi, any update on this? |
At the moment due to the migration from Vue2 to Vue3 there has been little progress on feature requests. For now, you will have to find a way to change the color schema via bulma CSS which is what Buefy is built upon. See: jgthms/bulma#2342 https://github.com/jgthms/bulma/tree/css-variables-with-fallback |
I've searching a lot how people have implemented a Dark Theme / Dark Mode but no success so far.
I'm planing to move my own project from Vuetify to Buefy, but Dark theme is required.
On Vuetify you only need set a prop in the component and it's done. So I can toggle the entire app from Light to Dark.
Am I right to say that there's no such thing as Dark mode property for the components?
The text was updated successfully, but these errors were encountered: