Skip to content

feat(lib): migrate breakpoints from infix to prefix#3499

Draft
MaxLardenois wants to merge 21 commits intoouds/mainfrom
ouds/main-migrate-breakpoints-from-infix-to-prefix
Draft

feat(lib): migrate breakpoints from infix to prefix#3499
MaxLardenois wants to merge 21 commits intoouds/mainfrom
ouds/main-migrate-breakpoints-from-infix-to-prefix

Conversation

@MaxLardenois
Copy link
Copy Markdown
Collaborator

@MaxLardenois MaxLardenois commented Apr 8, 2026

Types of change

  • Non-breaking change
  • Breaking change (fix or feature that would change existing functionality and usage)

Related issues

Closes #3497

Context & Motivation

Be like Tailwind and Bs6

Description

Checklists

  • I have read the contributing guidelines
  • My change follows the developer guide
  • My change pass all tests
  • My change is compatible with a responsive display
  • I have added tests (Javascript unit test or visual) to cover my changes
  • My change introduces changes to the documentation that I have updated accordingly
    • Title and DOM structure is correct
    • Links have been updated (title changes impact links)
    • CSS for the documentation
  • I have checked all states and combinations of the component with my change
  • I have checked all the impacts for the other components and core behavior (grid, reboot, utilities)

Checklist (for Core Team only)

  • The changes need to be in the migration guide
  • The changes are well displayed in Storybook (be careful if example order has changed for DSM)
  • The changes are compatible with RTL
  • Manually test browser compatibility with BrowserStack (Chrome 120, Firefox 121, Edge 120, Safari 15.6, iOS Safari, Chrome & Firefox on Android)

Progression (for Core Team only)

Live previews

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 8, 2026

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit fab47ce
🔍 Latest deploy log https://app.netlify.com/projects/boosted/deploys/69e79ddbbd62a0000845cf43
😎 Deploy Preview https://deploy-preview-3499--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@MaxLardenois MaxLardenois changed the title feat(lib): migrate from infix to prefix for breakpoints feat(lib): migrate breakpoints from infix to prefix Apr 8, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates responsive breakpoint utilities from an infix naming convention (e.g. mb-md-none, col-md-6) to a Tailwind/Bootstrap-v6-style prefix convention (e.g. md:mb-none, md:col-6) across the docs site and the SCSS generator, while adding an optional Bootstrap-compatibility mode.

Changes:

  • Introduces a breakpoint-prefix mechanism in SCSS (escaped :) and updates utility/grid generation to emit bp:... classnames.
  • Adds/extends Bootstrap compatibility generation paths (infix-style classes) gated by $enable-bootstrap-compatibility.
  • Updates site docs/examples/templates/tests/config to use the new prefix notation.

Reviewed changes

Copilot reviewed 87 out of 89 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
site/src/scss/docs_prod.scss Enables Bootstrap compatibility for production docs SCSS build.
site/src/scss/docs.scss Enables Bootstrap compatibility for docs SCSS build.
site/src/scss/_component-examples.scss Expands example selectors to account for :col prefixed responsive classes.
site/src/pages/resources.astro Migrates grid column classes to prefix breakpoint notation.
site/src/pages/[brand]/index.astro Migrates responsive flex/alignment utility usage to prefix notation.
site/src/pages/[brand]/docs/versions.astro Migrates responsive grid classes to prefix notation.
site/src/pages/[brand]/docs/[version]/examples/index.astro Migrates responsive flex/spacing utilities to prefix notation.
site/src/libs/data.ts Tightens TS return types via assertions for cached/parsed data.
site/src/layouts/partials/ThemeToggler.astro Migrates d-lg-nonelg:d-none.
site/src/layouts/partials/ExamplesMain.astro Migrates responsive grid classes to prefix notation.
site/src/layouts/SingleLayout.astro Migrates responsive spacing utilities to prefix notation.
site/src/layouts/DocsLayout.astro Migrates many responsive layout utilities to prefix notation.
site/src/content/docs/utilities/text.mdx Updates responsive text alignment examples to prefix notation.
site/src/content/docs/utilities/stretched-link.mdx Updates responsive grid/spacing examples to prefix notation.
site/src/content/docs/utilities/stack.mdx Updates responsive grid usage in examples to prefix notation.
site/src/content/docs/utilities/spacing.mdx Updates notation docs + examples to prefix notation.
site/src/content/docs/utilities/position.mdx Adds prefix notation examples and wraps Bootstrap-style examples in compatibility block.
site/src/content/docs/utilities/overflow.mdx Updates responsive display/spacing utilities in examples to prefix notation.
site/src/content/docs/utilities/opacity.mdx Updates responsive display utility in examples to prefix notation.
site/src/content/docs/utilities/object-fit.mdx Updates responsive object-fit docs/examples; adds compatibility section.
site/src/content/docs/utilities/float.mdx Updates responsive float docs/examples; adds compatibility section.
site/src/content/docs/utilities/flex.mdx Updates responsive flex docs; adds compatibility section.
site/src/content/docs/utilities/display.mdx Updates display docs/examples for prefix notation; adds print prefix docs + compatibility block.
site/src/content/docs/utilities/api.mdx Updates utilities API docs to show escaped : selectors and print prefix behavior.
site/src/content/docs/layout/utilities.mdx Updates responsive utility references to prefix notation.
site/src/content/docs/layout/gutters.mdx Updates gutter/grid examples to prefix notation.
site/src/content/docs/layout/grid.mdx Updates grid docs/examples and adds compatibility blocks for old naming.
site/src/content/docs/layout/css-grid.mdx Adds prefix notation example + compatibility block.
site/src/content/docs/layout/columns.mdx Adds prefix notation examples + compatibility block; updates order/offset/margins examples.
site/src/content/docs/layout/breakpoints.mdx Removes Sass map mention snippet from docs page.
site/src/content/docs/getting-started/migration.mdx Updates migration guide examples to prefix notation.
site/src/content/docs/getting-started/migration-from-boosted.mdx Updates Boosted migration notes for prefix notation.
site/src/content/docs/foundation/typography.mdx Updates grid-based examples to prefix notation.
site/src/content/docs/foundation/options.mdx Updates option docs examples to prefix notation.
site/src/content/docs/foundation/color-palette.mdx Updates grid examples to prefix notation.
site/src/content/docs/foundation/approach.mdx Updates responsive display example to prefix notation.
site/src/content/docs/components/tags.mdx Updates row-cols responsive class to prefix notation.
site/src/content/docs/components/switch.mdx Updates responsive grid examples to prefix notation.
site/src/content/docs/components/radio-button.mdx Updates responsive grid examples to prefix notation.
site/src/content/docs/components/icon.mdx Updates responsive gap example to prefix notation; adjusts an icon class name.
site/src/content/docs/components/header.mdx Updates navbar expand + spacing + display utilities to prefix notation.
site/src/content/docs/components/footer.mdx Updates responsive grid/display/spacing utilities to prefix notation.
site/src/content/docs/components/chips.mdx Updates row-cols responsive class to prefix notation.
site/src/content/docs/components/checkbox.mdx Updates responsive flex/grid examples to prefix notation.
site/src/content/docs/components/buttons.mdx Updates responsive display/flex/spacing examples to prefix notation.
site/src/content/docs/components/badges.mdx Updates row-cols responsive class to prefix notation.
site/src/content/docs/components/alerts.mdx Updates row-cols responsive class to prefix notation.
site/src/content/docs/components.mdx Updates responsive row-cols classes to prefix notation.
site/src/components/shortcodes/Example.astro Migrates responsive d-md-flex usage in snippet UI to prefix notation.
site/src/components/shortcodes/Code.astro Migrates responsive padding utility to prefix notation.
site/src/components/shortcodes/BootstrapCompatibility.astro Migrates responsive float utility to prefix notation in the callout header.
site/src/components/home/MastHead.astro Migrates responsive grid/display utilities to prefix notation.
site/src/components/home/GetStarted.astro Migrates responsive grid/display/spacing utilities to prefix notation.
site/src/components/home/Customize.astro Migrates responsive grid/display/spacing utilities to prefix notation.
site/src/components/home/CSSVariables.astro Migrates responsive grid/display/spacing utilities to prefix notation.
site/src/components/header/Versions.astro Migrates responsive display/spacing utilities to prefix notation.
site/src/components/header/SubNav.astro Migrates responsive display utility to prefix notation.
site/src/components/header/Skippy.astro Migrates responsive display utility to prefix notation.
site/src/components/header/Navigation.astro Migrates navbar expand + spacing + display utilities to prefix notation.
site/src/components/footer/Footer.astro Migrates responsive grid/display/spacing utilities to prefix notation.
site/src/components/DocsSidebar.astro Migrates responsive padding utilities to prefix notation.
site/src/assets/examples/grid/index.astro Migrates example markup to prefix notation.
site/src/assets/examples/download-app/index.astro Migrates many responsive utilities to prefix notation.
site/data/breakpoints.yml Changes breakpoint abbreviations from -md style to md style to support prefix rendering.
scss/utilities/_api.scss Updates utility generation to use breakpoint prefixes + adds bootstrap-compatible variants + print prefix.
scss/tests/utilities/_api.test.scss Updates expected selectors to escaped-colon prefix form.
scss/tests/mixins/_utilities.test.scss Updates tests for new generate-utility prefix parameterization.
scss/mixins/_utilities.scss Changes utility generator to accept breakpoint prefix + infix separately and emit prefixed selectors.
scss/mixins/_grid.scss Migrates grid/css-grid/gutter class generation to prefix notation + adds bootstrap compatibility emission.
scss/mixins/_breakpoints.scss Adds breakpoint-prefix() + CSS identifier escaping helper for leading digits.
scss/helpers/_position.scss Migrates sticky helpers to prefix notation + adds bootstrap compatibility aliases.
scss/_utilities.scss Adds responsive-bootstrap flags across utilities to drive compatibility generation.
scss/_tables.scss Migrates table responsive helpers to prefix notation + adds bootstrap compatibility aliasing.
scss/_offcanvas.scss Migrates offcanvas responsive helpers to prefix notation + adds bootstrap compatibility aliasing.
scss/_navbar.scss Migrates navbar expand variants to prefix notation + adds bootstrap compatibility aliasing.
scss/_modal.scss Migrates modal fullscreen-down helpers to prefix notation + adds bootstrap compatibility aliasing.
scss/_maps.scss Adjusts $gutters default mapping and removes conditional merge behavior.
scss/_list-group.scss Migrates list-group horizontal responsive helpers to prefix notation + adds bootstrap compatibility aliasing.
scss/_dropdown.scss Migrates responsive dropdown alignment helpers to prefix notation + adds bootstrap compatibility aliasing.
js/tests/visual/tooltip.html Migrates responsive grid markup to prefix notation.
js/tests/visual/toast.html Migrates responsive grid markup to prefix notation.
js/tests/visual/scrollspy.html Migrates navbar expand class to prefix notation.
js/tests/visual/modal.html Migrates navbar expand class to prefix notation.
js/tests/visual/dropdown.html Migrates navbar expand + grid markup to prefix notation.
js/tests/integration/index.html Migrates responsive display utilities to prefix notation.
.stylelintrc.json Updates selector class pattern to allow optional breakpoint prefix segments.
.bundlewatch.config.json Raises CSS bundle size thresholds to account for expanded output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread site/src/assets/examples/grid/index.astro Outdated
Comment thread scss/helpers/_position.scss Outdated
Comment thread scss/_navbar.scss Outdated
Comment thread site/src/content/docs/utilities/flex.mdx
Comment thread site/src/content/docs/layout/gutters.mdx Outdated
@louismaximepiton louismaximepiton self-requested a review April 17, 2026 11:34
@louismaximepiton louismaximepiton linked an issue Apr 17, 2026 that may be closed by this pull request
2 tasks
Copy link
Copy Markdown
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's missing some changes in some files:

  • *.spec.js (searched for -lg, -md, in collapse and offcanvas, dropdown)
  • *.ts (searched for -lg, -md, -2xl, in component-details)
  • *.js (searched for -lg, -md, in tac.js)
  • .gx-sm -> .gx-small in examples/grid/index.astro
  • .mt-xl -> .mt-xlarge in getting-strated/javascript.mdx
  • ps-xl -> ps-xlarge in migration-from-boosted/mdx

.border-lg-start haven't been renamed (docs only)
.offcanvas-lg haven't been renamed in sidebar.scss (docs only)

Wondering if we should rename:

  • placeholder-lg -> placeholder-large and all this kind of classes
  • container-lg -> lg:container

We'll need to be careful updating this PR with all the incoming files.


@media print {
.font-size-print-large {
.print\:font-size-large {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also change this kind of infix ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seemed logical to me, also Bs6 did it too.

Comment thread scss/utilities/_api.scss
}
}

// RFS rescaling
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can safely remove this section

Copy link
Copy Markdown
Collaborator Author

@MaxLardenois MaxLardenois Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I wanted to wait for you PR #3504 to be merged for this

Comment thread site/data/breakpoints.yml

- breakpoint: 3xl
abbr: -3xl
abbr: 3xl
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need breakpoint and abbr in this file ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to remove them but it's way easier to create the documentation for flex and fload with it...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The first two examples show the scaled and fixed margin classes in action. The last one shows how to recreate an equivalent of `.mx-scaled-large` by combining other responsive margin classes.

@media (min-width: 1880px) {
.border-3xl { ... }
.border-3xl-none { ... }
.3xl\:border-none { ... }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we show these borders utilities .border-bkp ? Or they should be removed as the examples above ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably an error when updating

Comment thread .stylelintrc.json
{
"files": "**/*.scss",
"rules": {
"selector-class-pattern": [
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you have some examples that didn't work in the doc ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in the doc, but in the tests yes

Comment thread scss/mixins/_breakpoints.scss Outdated

@return "#{css-escape-ident($name)}\\:";
}
// END mod
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even wondering if we should continue to add these comments in our files

Suggested change
// END mod
// End mod

@@ -1,3 +1,6 @@
@use "sass:list";
@use "sass:string";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot remember why didn't use these rules before. I'm fine using them, just we have str-slice instead of string.slice, and str-index or index instead of list.index.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used them to use the code from bs6 directly as it does not have other consequence I think it's ok. I did not modify the rest of the file though to keep the modification small but we can do it.

// Utility generator
// Used to generate utilities & print utilities
@mixin generate-utility($utility, $infix: "", $is-rfs-media-query: false) {
@mixin generate-utility($utility, $bkpt-prefix: "", $infix: "") {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@mixin generate-utility($utility, $bkpt-prefix: "", $infix: "") {
@mixin generate-utility($utility, $infix: "", $bkpt-prefix: "") {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you suggest this? I put infix at the end because it will be removed at some point.

// Utility generator
// Used to generate utilities & print utilities
@mixin generate-utility($utility, $infix: "", $is-rfs-media-query: false) {
@mixin generate-utility($utility, $bkpt-prefix: "", $infix: "") {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need $infix ?

Copy link
Copy Markdown
Collaborator Author

@MaxLardenois MaxLardenois Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, to generate responsive-bootstrap: true utilities see api.scss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress / Draft

Development

Successfully merging this pull request may close these issues.

[OUDS] Migrate breakpoints from infix to prefix

3 participants