Migrate from infix to prefix#42203
Conversation
- Replace the breakpoint infix pattern (e.g., `.d-md-none`, `.col-lg-6`) with a prefix pattern using an escaped colon (e.g., `.md\:d-none`, `.lg\:col-6`), - Rename `breakpoint-infix()` to `breakpoint-prefix()` and add `css-escape-ident()` for leading-digit breakpoints like `2xl` - Update `generate-utility()`, grid, and all component/helper loops - Update containers, navbar, offcanvas, tables, list-group, stepper, dialog, sticky, and stacks responsive classes - Update SCSS and JS tests - Update all docs Made-with: Cursor
|
This change is amazing, especially since using breakpoints with utility classes that use semantic values (e.g: |
|
Not sure if this is possible, but any chance of |
|
woah. big change, will take a little bit of getting used to, but I think I like it. One query though, you said:
but it's actually like |
He meant it in the sense that the generated CSS classes will use an escaped colon, otheriwse the colon would act as a pseudo-class, for example defining As a long term, side bonus... since AI agents tend to generate HTML templates using Tailwind syntax, this will make it much easier to port code from Tailwind to Bootstrap. I'd go a step forward, and do the same with the |
Credit due where credit is due—Tailwind's prefix syntax is better. This migrates us to use it all over the project. One thing I've realized is our responsive utilities having an infix is confusing for where the infix appears and what not. Infix also being buried within the class is annoying for parsing classes IMO.
.d-md-none,.col-lg-6) with a prefix pattern using an escaped colon (e.g.,.md\:d-none,.lg\:col-6),breakpoint-infix()tobreakpoint-prefix()and addcss-escape-ident()for leading-digit breakpoints like2xlgenerate-utility(), grid, and all component/helper loops