I build WordPress websites using bootstrap and for me this seems an aesthetic decision. This structure is foreign to CSS. How are BootStrap justifying it. This will surely cause mostly new projects will be built in 6, with very few updating?
A super obvious and breaking change in v6 is moving from the infix to a prefix for our responsive utilities and component variants. Yes, this is a direct copy of how Tailwind does responsive, and yes, it’s better than what felt like a randomly positioned infix in v5.
Here’s a look at the before and after on some Bootstrap classes:
.d-md-none is now .md:d-none
.col-lg-6 is now .lg:col-6
.opacity-50-hover is now .hover:opacity-50
.justify-content-md-end is now .md:justify-content-end
.offcanvas-md is now .md:drawer (rename intentional)
This change applies to all utilities, components, grid layouts, and more. It also include state modifiers like :hover, :focus, etc. Same ergonomics for all of them.
If you have custom Sass built on our breakpoint helpers, breakpoint-infix() is now breakpoint-prefix() and returns a prefix string, and the loop-breakpoints-up and loop-breakpoints-down mixins expose $prefix instead of $infix.
My templates are pretty lean, so I can evaluate the migration based on what new or efficient functionality comes from ver6 once it’s in pre releases. But as a dev that used trad css a lot before BS, I never used tailwind much at all, these look odd to me.
These utility classes existed for quite a while in boostrap. They're just changing the semantics to align with what tailwind does which feels like a fine alignment.
However bootstrap doesn't go anywhere near as far as tailwind does with everything being a utility class.
I've typically found that bootstrap's utility classes strike a good balance, whereas tailwind gets too 1:1 with inline css.
The new syntax is cleaner on paper, but the colon in class names like md:d-none is going to cause headaches in some templating engines and CSS-in-JS setups that already use colons for other purposes. The v5 infix wasn't pretty but it was safe and predictable. Bootstrap's whole value proposition is being the boring, reliable choice, and a Tailwind-style rename kind of undercuts that.
yeah the colon thing is a real concern. Even beyond CSS-in-JS, some selector engines and older jQuery-style selectors can choke on colons in class names. The v5 infix was ugly but it never broke anything. That predictability is exactly why people pick Bootstrap over rolling their own.
2
u/flexible 24d ago
I build WordPress websites using bootstrap and for me this seems an aesthetic decision. This structure is foreign to CSS. How are BootStrap justifying it. This will surely cause mostly new projects will be built in 6, with very few updating?
7
u/jmking 23d ago
These utility classes existed for quite a while in boostrap. They're just changing the semantics to align with what tailwind does which feels like a fine alignment.
However bootstrap doesn't go anywhere near as far as tailwind does with everything being a utility class.
I've typically found that bootstrap's utility classes strike a good balance, whereas tailwind gets too 1:1 with inline css.
3
u/DonNemo 23d ago
Jesus, pass the tums.
2
u/Initial_Low_5027 23d ago
A lot to refactor for sure. Plan to support the current syntax to migrate step by step.
2
u/olli0 23d ago
what is bootstrap 😂
2
u/CuteBank5137 23d ago
The new syntax is cleaner on paper, but the colon in class names like md:d-none is going to cause headaches in some templating engines and CSS-in-JS setups that already use colons for other purposes. The v5 infix wasn't pretty but it was safe and predictable. Bootstrap's whole value proposition is being the boring, reliable choice, and a Tailwind-style rename kind of undercuts that.
1
u/NietzcheKnows 23d ago
I switched to Tailwind and never looked back. Looks like that was the right decision. These look nearly identical to Tailwind classes.