bulma icon indicating copy to clipboard operation
bulma copied to clipboard

importing light theme and dark theme leads to nothing

Open ghost opened this issue 5 months ago • 4 comments

@use "bulma/sass/themes/light";
@use "bulma/sass/themes/dark";

when i import themes like this it generates me no color scheme at all

but according to https://bulma.io/documentation/features/themes/ it should be possible

ghost avatar Jul 06 '25 16:07 ghost

Hi @h42r23f , do you add class 'theme-dark' or data-attribute in html after you import the theme?

MiaChan1024 avatar Jul 07 '25 01:07 MiaChan1024

no, why would i add that? i expect the css get filled with the css rules/attributes from bulma in the first place but they are not there, shall i add them for them to show up? if so why do they show up if i simply include themes without specifying which one is required without modifications in html?

ghost avatar Jul 07 '25 11:07 ghost

Hi, their official doc mentions it can be used with a css selector or data attribute (https://bulma.io/documentation/features/themes/) with an HTML attribute [data-theme=$name] and CSS class .theme-$name selector If you inspect their official doc webpage, you will be able to see the data-theme used inside html. Hope this helps!

MiaChan1024 avatar Jul 07 '25 23:07 MiaChan1024

If you inspect their official doc webpage, you will be able to see the data-theme used inside html.

it doesnt use splitting it uses the entire bulma as is, which creates 100000000 rules to make your browser's devtools lag.

ghost avatar Jul 08 '25 05:07 ghost