Thoughts on Bootstrap 5.2.0 CSS Variables?

Just curious as to people’s thoughts on the new (as of BS 5.2) CSS variables in Bootstrap. Have you found them useful? Unnecessary? No opinion either way?

1 Like

I see nobody has chimed in on this, so I guess I’ll be the first. My initial impressions are that they are just adding an unnecessary level of complication to the CSS. Maybe I’m not seeing the advantage in having 20 CSS rules for the .navbar class that are all preceded by --bs-navbar-(whatever.)

Anyone else have an opinion? Maybe someone can explain what I’m missing, because I don’t see the big advantage here.

It’s more easy to customize theme in BSS with CCS variables.

I hear that just around the corner (5.3) light dark themes will be possible and I am sure css var will be driving that home to the winners circle. So much that has changed in 5 that there could be 15 topics on it all… :soccer:

1 Like

I guess since I don’t really use “themes” in my work, this benefit is lost on me.

THIS will be very cool. I build some template-style websites for martial arts schools, and I would love it if I could offer a particular design that could easily be switched from “light” to “dark.”

Here is a preview of what is to come…

New Features

Bootstrap has tons of new flexibility !

How would you work on them for BSS? Is there any article about it? Add a new .css and add new values to the variables so the get overwritten? Haven’t touched that part yet.

@Seb I am just importing the Boostrap source files and compiling them inside BSS. Bootstrap development is

Light Dark example using the two :root Light Dark Bootstrap 5

So you download the source files and import them into BSS and then work on these files? I have no experience on this type of workflow :slight_smile: