bulma icon indicating copy to clipboard operation
bulma copied to clipboard

How to customise without SASS?

Open RichardJECooke opened this issue 2 years ago • 4 comments

Bulma

Bulma Feature/question?

Overview of the problem

Bulma CSS framework This is about the Bulma Docs

Description

Hi. Can we customise Bulma without SASS please? I'm looking to use a CSS-only framework, without a compilation step, in a small website, which is how I Google Bulma. And was wondering if I can just overwrite your variables with my own --css-variables. The docs don't mention what variables I'd need to change this.

RichardJECooke avatar May 31 '22 11:05 RichardJECooke

Not supported yet. There are plans to implement CSS Custom Properties in the future, along with other features.

Alternatively, check out this fork with CSS vars support.

kauefr avatar Jun 02 '22 12:06 kauefr

@bulvar/bulma will do the trick

daniil4udo avatar Jun 02 '22 13:06 daniil4udo

Themes and Mixins

Hello!

I think I have the same issue. I'm using Bulma in my company's Enteprise Apps and, among other things, AG-Grid. This allows me to change some colours that I very much wish to keep in line with the overall Bulma theme. In this example:

.ag-theme-balham.train {
  --ag-header-foreground-color: white;
  --ag-header-background-color: #00d1b2;
}

I'm using the is-primary colour as background colour of the table header, but I need to put it by code, which is bad.

Before suggestions start pouring in, two things about AG-Grid:

  1. This is generated content from large datasets. I cannot get into it and interfere.
  2. These are NOT HTML tables. These are large streams of individual DIVs organised in a grid fashion. The option of selecting these as th or td does not apply here.

Something I believe I can't do in CSS (yet?) is to grab a definition's values, like var(.button.isprimary.background-color). Another thing that I have off the table is LESS/SASS/SCSS. This is -- as Bulma itself self-describes -- pure CSS.

Why aren't there :root variables in Bulma like --is-primary-color, --is-primary-background-color and such variables available? With those, making up themes would be very very easy, and so would be mixing these with foreign libraries such as AG-Grid.

Not to mention that the colour I referred to in the example -- #00d1b2 -- appears in Bulma 0.9.4 founrty four times!

ricardo-reis-1970 avatar Apr 21 '23 15:04 ricardo-reis-1970

Possibly dup https://github.com/jgthms/bulma/issues/3028

nekketsuuu avatar Jun 07 '23 06:06 nekketsuuu