Option to have no class suffix
staab opened this issue ยท 7 comments
I'm using re-bulma (and loving it), but there are certain app-specific styles I'd like to implement, using bulma class names. Unfortunately, all class names have a random suffix appended, I assume for isolation/modularity? I'd rather not hard-code the bulma suffix in my css, and I'd like to use bulma's class names freely in my code. Is there any way around this in the current version? It would be nice to have a build without this, or maybe with a prefix to classes, like re-bulma-message
, etc.
Edit:
Just tracked down csjs. That makes sense. Any suggestions for elegantly extending re-bulma's styles?
@staab Thanks for your suggestion.
I add random suffix every version because, I wanted to create a pseudo scoped class for component.But as you say, can not bellow custom is now the way. I'm not good with this.
- for example
.message_xxxxxx.your_custom_classname {
color: red;
}
It would be nice to have a build without this, or maybe with a prefix to classes, like re-bulma-message, etc.
It is nice suggestion.I'll change suffix to fixed prefix , for example ___re-bulma_message
.But the next version is is being applied.Difficult in the current version.
As soon as possible so as to embark on the next version.
next version sample is https://github.com/bokuweb/re-bulma/blob/next/build/css.js
Wow @bokuweb you are amazing. I was just starting the process of moving away from re-bulma because I can't usually expect small open source projects to be very responsive, and I don't have time to issue a patch myself. Kudos and well done.
Hey @bokuweb thanks for doing this; I ought to let you know that after a second look, I'm still going to have to go my own way ๐. While csjs is a totally valid approach, we're using a traditional sass stylesheet, importing variables from bulma itself in order to theme bulma. Maybe another approach would be to have a build that relies on bulma as a dependency, and assumes its own non-modularized class names?
Ummm. It is difficult if want to switch it on runtime. If want to use non-modularized class names, it is a need to customize csjs
and swicth, non-modularized or modularized class names n build with build option. (Sorry for my poor English.)
Thanks; and no worries about your english! It's definitely a sticky thing, and I'm not sure how you'd support multiple use cases without pre-building all variants.