feat(lib): Remove useless mixin rfs and font-size + remove vendor#3504
feat(lib): Remove useless mixin rfs and font-size + remove vendor#3504louismaximepiton wants to merge 3 commits intoouds/mainfrom
Conversation
✅ Deploy Preview for boosted ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR removes the RFS vendor implementation and related Sass mixins (rfs, font-size) across the SCSS codebase to reduce CSS bundle size, and updates the site/config/docs accordingly.
Changes:
- Remove the RFS vendor file and all remaining
@include rfs(...)/@include font-size(...)usages, replacing them with directfont-size:/ CSS variable assignments. - Simplify utilities generation by dropping the RFS-specific branch and its tests.
- Remove
rfs_versionfrom site config validation and from brand config files; update docs/migration notes to reflect the breaking change.
Reviewed changes
Copilot reviewed 39 out of 40 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| site/src/scss/_component-examples.scss | Replace @include font-size(inherit) with font-size: inherit. |
| site/src/libs/validation.ts | Remove zPrefixedVersionSemver validator (no longer needed). |
| site/src/libs/config.ts | Drop rfs_version from config schema/imports. |
| site/src/content/docs/utilities/api.mdx | Remove the (commented) rfs utility option row. |
| site/src/content/docs/getting-started/migration.mdx | Add migration notes about RFS/vendor and font-size() removal. |
| site/src/content/docs/getting-started/migration-from-boosted.mdx | Add similar migration notes for Boosted migrations. |
| site/src/content/docs/foundation/options.mdx | Remove $enable-rfs mention from options table. |
| scss/vendor/_rfs.scss | Delete the embedded RFS implementation. |
| scss/utilities/_api.scss | Remove the RFS rescaling media-query generation block. |
| scss/tests/mixins/_utilities.test.scss | Remove RFS-related generate-utility tests. |
| scss/mixins/_utilities.scss | Remove $is-rfs-media-query arg + RFS value selection logic. |
| scss/mixins/_pagination.scss | Replace @include rfs(..., --var) with direct CSS var assignment. |
| scss/mixins/_forms.scss | Replace @include font-size(...) with font-size:. |
| scss/mixins/_buttons.scss | Replace @include rfs(..., --var) with direct CSS var assignment. |
| scss/forms/_labels.scss | Replace @include font-size(...) with font-size:. |
| scss/forms/_input-group.scss | Replace @include font-size(...) with font-size:. |
| scss/forms/_form-text.scss | Update comment to reflect direct font-size replacement context. |
| scss/forms/_form-control.scss | Replace @include font-size(...) with font-size:. |
| scss/_variables.scss | Remove $enable-rfs variable. |
| scss/_type.scss | Update comments to reflect direct font-size replacement. |
| scss/_tooltip.scss | Replace RFS/css mixin usage with direct var assignment + font-size:. |
| scss/_toasts.scss | Replace RFS/css mixin usage with direct var assignment + font-size:. |
| scss/_root.scss | Replace @include rfs(..., --body-font-size) with direct CSS var assignment. |
| scss/_reboot.scss | Replace @include font-size(...) with font-size: in reboot rules. |
| scss/_progress.scss | Replace RFS/css mixin usage with direct var assignment + font-size:. |
| scss/_popover.scss | Replace RFS/css mixin usage with direct var assignment + font-size:. |
| scss/_pagination.scss | Replace RFS/css mixin usage with direct var assignment + font-size:. |
| scss/_navbar.scss | Replace RFS/css mixin usage with direct var assignment + font-size:. |
| scss/_nav.scss | Replace RFS/css mixin usage with direct var assignment + font-size:. |
| scss/_mixins.scss | Stop importing vendor RFS. |
| scss/_images.scss | Replace @include font-size(...) with font-size:. |
| scss/_dropdown.scss | Replace RFS/css mixin usage with direct var assignment + font-size:. |
| scss/_buttons.scss | Update comment reflecting removal of --btn-font-size handling. |
| scss/_accordion.scss | Replace @include font-size(...) with font-size:. |
| packages/sosh/scss/ouds-web-grid.scss | Remove @import "@ouds/web-common/scss/vendor/rfs". |
| packages/sosh/config.yml | Remove rfs_version entry. |
| packages/orange/scss/ouds-web-grid.scss | Remove @import "@ouds/web-common/scss/vendor/rfs". |
| packages/orange/config.yml | Remove rfs_version entry. |
| packages/orange-compact/scss/ouds-web-grid.scss | Remove @import "@ouds/web-common/scss/vendor/rfs". |
| packages/orange-compact/config.yml | Remove rfs_version entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MaxLardenois
left a comment
There was a problem hiding this comment.
Just some small things
| h1 { | ||
| @extend %heading; | ||
| @include get-font-size("heading-xlarge"); // OUDS mod: instead of `@include font-size($h1-font-size)` | ||
| @include get-font-size("heading-xlarge"); // OUDS mod: instead of `font-size: $h1-font-size` |
There was a problem hiding this comment.
Question: do you consider those "instead of" to be agains Boosted, Bootstrap or Bootstrap v6 ? For Boosted or Bootstrap it should still say "instead of @include font-size() no?
|
|
||
| - <span class="tag tag-small rounded-none tag-warning">Warning</span> `scss/mixins/_alert.scss` doesn’t exist anymore. If you were importing it in your project, please make sure to remove it. | ||
|
|
||
| - <span class="tag tag-small rounded-none tag-warning">Warning</span> `scss/vendor/_rfs.scss` doesn’t exist anymore. You shouldn’t have used it anyway, but we removed it. |
There was a problem hiding this comment.
A little less passive aggressive ;)
| - <span class="tag tag-small rounded-none tag-warning">Warning</span> `scss/vendor/_rfs.scss` doesn’t exist anymore. You shouldn’t have used it anyway, but we removed it. | |
| - <span class="tag tag-small rounded-none tag-warning">Warning</span> `scss/vendor/_rfs.scss` has been removed. It was deprecated and should not have been used. |
|
|
||
| - <span class="tag tag-small rounded-none tag-warning">Warning</span> `scss/vendor/_rfs.scss` doesn’t exist anymore. You shouldn’t have used it anyway, but we removed it. | ||
|
|
||
| - <span class="tag tag-small rounded-none tag-negative">Breaking</span> `font-size()` mixin doesn’t exist anymore. You should refer to `get-font-size()` mixin instead. |
There was a problem hiding this comment.
| - <span class="tag tag-small rounded-none tag-negative">Breaking</span> `font-size()` mixin doesn’t exist anymore. You should refer to `get-font-size()` mixin instead. | |
| - <span class="tag tag-small rounded-none tag-negative">Breaking</span> `font-size()` mixin has been removed. Please refer to `get-font-size()` mixin instead. |
|
|
||
| - <span class="tag tag-small rounded-none tag-warning">Warning</span> `scss/vendor/_rfs.scss` doesn’t exist anymore. You shouldn’t have used it anyway, but we removed it. | ||
|
|
||
| - <span class="tag tag-small rounded-none tag-warning">Warning</span> `font-size()` mixin doesn’t exist anymore. You should refer to `get-font-size()` mixin instead. |
There was a problem hiding this comment.
| - <span class="tag tag-small rounded-none tag-warning">Warning</span> `font-size()` mixin doesn’t exist anymore. You should refer to `get-font-size()` mixin instead. | |
| - <span class="tag tag-small rounded-none tag-warning">Warning</span> `font-size()` mixin has been removed. Please refer to `get-font-size()` mixin instead. |
|
|
||
| ### CSS and Sass variables | ||
|
|
||
| - <span class="tag tag-small rounded-none tag-warning">Warning</span> `scss/vendor/_rfs.scss` doesn’t exist anymore. You shouldn’t have used it anyway, but we removed it. |
There was a problem hiding this comment.
| - <span class="tag tag-small rounded-none tag-warning">Warning</span> `scss/vendor/_rfs.scss` doesn’t exist anymore. You shouldn’t have used it anyway, but we removed it. | |
| - <span class="tag tag-small rounded-none tag-warning">Warning</span> `scss/vendor/_rfs.scss` has been removed. It was deprecated and should not have been used. |
Types of change
Related issues
Following twbs/bootstrap#41938.
Context & Motivation
Reduce our bundle size on CSS and remove dead code.
Description
Removes the rfs mixins and functions, as well as the font-size mixin.
Checklists
Checklist (for Core Team only)
Progression (for Core Team only)
ouds/mainfollowing conventional commitLive previews