Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
SPFx 1.23.0-rc.1, Node 22.22.2 LTS
Describe the bug / error
After upgrading to SPFx 1.23.0-rc.1, CSS classes that should stay global are being transformed into CSS module-scoped names.
In our SPFx Webpart we use a flexbox based grid system. The component itself has not been changed since many SPFx Versions and is stable since then.
The structure looks like:
gridComponent.module.scss which should use module-scoped names but includes mixins with :global(...) scoped classes:
`.gridClass {
height: 100%;
width: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
flex-grow: 1;
color: $ms-color-black;
outline: none !important;
position: relative;
//import grid...
@import 'sass-flexbox-grid/scss/main.module.scss';
...
}`
And mixins like:
:global(.row) { @include row(); }
Before SPFx 1.23.0-rc.1 the result was something like .gridClass_6e35b56f .row { ... } but now even the row output contains hashed class names like row_6e35b56f instead of row.
Downgrade to SPFx 1.22.2 resolves the issue.
Steps to reproduce
- Use SPFx 1.23.0-rc.1.
- Define utility selectors in a .module.scss file using :global(.row) style selectors.
- Build/bundle project.
- Inspect generated CSS/module output. See that classes are renamed to hashed variants instead of staying global.
Expected behavior
Selectors wrapped with :global(...) should remain un-hashed and emitted as plain global CSS classes.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
SPFx 1.23.0-rc.1, Node 22.22.2 LTS
Describe the bug / error
After upgrading to SPFx 1.23.0-rc.1, CSS classes that should stay global are being transformed into CSS module-scoped names.
In our SPFx Webpart we use a flexbox based grid system. The component itself has not been changed since many SPFx Versions and is stable since then.
The structure looks like:
gridComponent.module.scss which should use module-scoped names but includes mixins with :global(...) scoped classes:
`.gridClass {
height: 100%;
width: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
flex-grow: 1;
color: $ms-color-black;
outline: none !important;
position: relative;
//import grid...
@import 'sass-flexbox-grid/scss/main.module.scss';
...
}`
And mixins like:
:global(.row) { @include row(); }Before SPFx 1.23.0-rc.1 the result was something like .gridClass_6e35b56f .row { ... } but now even the row output contains hashed class names like row_6e35b56f instead of row.
Downgrade to SPFx 1.22.2 resolves the issue.
Steps to reproduce
Expected behavior
Selectors wrapped with :global(...) should remain un-hashed and emitted as plain global CSS classes.