Skip to content
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

Bulma V 1.0, Dart Sass and Dark mode #211

Open
domw95 opened this issue Jul 27, 2024 · 3 comments
Open

Bulma V 1.0, Dart Sass and Dark mode #211

domw95 opened this issue Jul 27, 2024 · 3 comments

Comments

@domw95
Copy link

domw95 commented Jul 27, 2024

Thanks so much for creating this theme, I've been developing a site and its looking great.

I don't know if anyone has looked into updating to Bulma V1.0, but I have had a try myself.

The main issue is that its based on Dart Sass and uses syntax such has @use which isn't supported in LibSass that ships with Hugo (and is deprecated). Hugo can use Dart Sass, as shown in the docs. Basically you have to install the binary, and set transpiler to dartsass in the CSS options. This commit shows the changes.

One of the benefits of this is that it gives you dark mode (issue #156 ), although currently its a bit broken due to the way the colours are configured in this theme.

It is also quite simple to modify Bulma. The sass variables can be overridden by importing the module like this:

@use "../../bulma/sass" as * with ($primary: #4FC1EA);

And then $primary can be used as a variable in the rest of the sass files (or not if its no longer required because its the default for e.g a button)

I haven't quite figured out how this would play with the rest of the colours in the theme and whether it can work for automatic dark mode. If I managed to get it all working, is this something you would be interested in changing?

@StefMa
Copy link
Owner

StefMa commented Jul 27, 2024

Hey @domw95 ,

Thank you for looking into this!
I am very interested in all of the stuff yiu mentioned.
Replacing a deprecated sass engine, upgrade to Bulma 1.0, and dark mode!

Maybe we can make this changes incremental step by step?

Maybe a PR for each change?
Would this make sense?
Would this work?

I would also say that we ignore dark mode for now. Let's focus on Bulma and the Dart Sass for now. Even if there is kind of primitive support for dark mode, let's ignore those. As long as users won't have a bad user experience it would be fine I guess.

@passw0rd123
Copy link

Bulma has also a prebuild version using css variables to configure such things as colors used in this theme which are supported by all modern browsers.

If there is no special usecase for sass in this theme, there should be no need to build it ourselfes. This would reduce the dependencies and maybe also the need of the hugo extended version.

@StefMa
Copy link
Owner

StefMa commented Oct 23, 2024

Hey @passw0rd123
Thanks for the information.
I also only inherit this theme 🙃
I don't know if saas is required or not.
Maybe you can help to find out?
Actually using the normal version of Hugo and removing the dependency sounds pretty great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants