Skip to content

fix: escape FluentProvider SSR style selectors - #36464

Open
PaulGMardling wants to merge 6 commits into
microsoft:masterfrom
PaulGMardling:fix/fluent-provider-ssr-style-selector
Open

fix: escape FluentProvider SSR style selectors#36464
PaulGMardling wants to merge 6 commits into
microsoft:masterfrom
PaulGMardling:fix/fluent-provider-ssr-style-selector

Conversation

@PaulGMardling

Copy link
Copy Markdown
Contributor

Previous Behavior

During server-side rendering, FluentProvider inserted generated style selectors without escaping angle brackets. Prefixes supplied through IdPrefixProvider or React's identifierPrefix could therefore produce invalid inline style markup.

New Behavior

createCSSRuleFromTheme now escapes angle brackets in selectors using CSS code-point escapes. This keeps server-rendered style markup valid while preserving the intended selector.

Regression tests cover both IdPrefixProvider and React's identifierPrefix.

Related Issue(s)

  • Fixes (MSRC - 129538)[https://portal.microsofticm.com/imp/v5/incidents/details/31000000670576/msrc]

@PaulGMardling PaulGMardling self-assigned this Jul 30, 2026
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: Button, FluentProvider & webLightTheme
66.281 kB
19.002 kB
66.297 kB
19.006 kB
16 B
4 B
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
226.026 kB
68.049 kB
226.042 kB
68.045 kB
16 B
-4 B
react-components
react-components: FluentProvider & webLightTheme
39.504 kB
13.112 kB
39.52 kB
13.116 kB
16 B
4 B
react-components
react-components: entire library
1.295 MB
326.281 kB
1.295 MB
326.282 kB
22 B
1 B
react-provider
FluentProvider
18.896 kB
7.265 kB
18.912 kB
7.268 kB
16 B
3 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-avatar
Avatar
47.22 kB
14.855 kB
react-avatar
AvatarGroup
16.254 kB
6.502 kB
react-avatar
AvatarGroupItem
60.339 kB
18.758 kB
react-breadcrumb
@fluentui/react-breadcrumb - package
103.012 kB
28.827 kB
react-card
Card - All
92.93 kB
26.936 kB
react-card
Card
85.55 kB
25.023 kB
react-card
CardFooter
11.515 kB
4.599 kB
react-card
CardHeader
14.044 kB
5.422 kB
react-card
CardPreview
11.592 kB
4.711 kB
react-charts
AreaChart
405.805 kB
126.781 kB
react-charts
DeclarativeChart
757.337 kB
222.298 kB
react-charts
DonutChart
316.638 kB
97.601 kB
react-charts
FunnelChart
308.038 kB
94.378 kB
react-charts
GanttChart
388.936 kB
121.254 kB
react-charts
GaugeChart
315.986 kB
96.99 kB
react-charts
GroupedVerticalBarChart
397.013 kB
124.032 kB
react-charts
HeatMapChart
391.071 kB
122.287 kB
react-charts
HorizontalBarChart
296.314 kB
90.097 kB
react-charts
HorizontalBarChartWithAxis
63 B
83 B
react-charts
Legends
235.545 kB
70.669 kB
react-charts
LineChart
417.153 kB
129.918 kB
react-charts
PolarChart
344.492 kB
107.638 kB
react-charts
SankeyChart
212.696 kB
68.311 kB
react-charts
ScatterChart
396.479 kB
123.959 kB
react-charts
Sparkline
80.888 kB
26.864 kB
react-charts
VerticalBarChart
433.471 kB
128.969 kB
react-charts
VerticalStackedBarChart
403.031 kB
125.453 kB
react-checkbox
Checkbox
29.609 kB
10.527 kB
react-color-picker
ColorArea
43.944 kB
15.811 kB
react-color-picker
ColorPicker
14.988 kB
6.041 kB
react-color-picker
ColorSlider
38.952 kB
14.294 kB
react-combobox
Combobox (including child components)
138.149 kB
44.681 kB
react-combobox
Dropdown (including child components)
137.905 kB
44.453 kB
react-datepicker-compat
DatePicker Compat
216.224 kB
63.964 kB
react-dialog
Dialog (including children components)
89.951 kB
27.858 kB
react-field
Field
21.132 kB
7.881 kB
react-headless-components-preview
react-headless-components-preview: entire library
251.914 kB
72.891 kB
react-input
Input
25.027 kB
8.183 kB
react-list
List
74.531 kB
23.01 kB
react-list
ListItem
98.023 kB
29.881 kB
react-menu
Menu (including children components)
159.751 kB
50.711 kB
react-menu
Menu (including selectable components)
162.917 kB
51.347 kB
react-message-bar
MessageBar (all components)
22.304 kB
8.196 kB
react-overflow
hooks only
9.052 kB
3.227 kB
react-persona
Persona
54.173 kB
16.791 kB
react-popover
Popover
125.502 kB
40.442 kB
react-portal
Portal
12.714 kB
4.947 kB
react-portal-compat
PortalCompatProvider
5.341 kB
2.146 kB
react-positioning
usePositioning
28.985 kB
10.198 kB
react-positioning
useSafeZoneArea
12.399 kB
4.977 kB
react-progress
ProgressBar
19.063 kB
7.418 kB
react-radio
Radio
26.994 kB
8.711 kB
react-radio
RadioGroup
12.759 kB
5.176 kB
react-select
Select
24.876 kB
8.936 kB
react-slider
Slider
32.231 kB
11.086 kB
react-spinbutton
SpinButton
32.513 kB
10.584 kB
react-swatch-picker
@fluentui/react-swatch-picker - package
92.187 kB
27.315 kB
react-switch
Switch
32.231 kB
10.156 kB
react-table
DataGrid
146.759 kB
43.576 kB
react-table
Table (Primitives only)
36.893 kB
12.305 kB
react-table
Table as DataGrid
118.503 kB
33.331 kB
react-table
Table (Selection only)
65.373 kB
18.591 kB
react-table
Table (Sort only)
64.036 kB
18.204 kB
react-tag-picker
@fluentui/react-tag-picker - package
174.01 kB
54.191 kB
react-tags
InteractionTag
12.463 kB
4.942 kB
react-tags
Tag
28.376 kB
8.9 kB
react-tags
TagGroup
69.648 kB
21.404 kB
react-teaching-popover
TeachingPopover
100.694 kB
31.811 kB
react-textarea
Textarea
23.392 kB
8.447 kB
react-timepicker-compat
TimePicker
140.867 kB
46.058 kB
react-toast
Toast (including Toaster)
90.317 kB
28.14 kB
react-tooltip
Tooltip
53.519 kB
19.021 kB
react-tree
FlatTree
135.661 kB
40.459 kB
react-tree
PersonaFlatTree
137.524 kB
40.991 kB
react-tree
PersonaTree
133.605 kB
39.781 kB
react-tree
Tree
131.748 kB
39.265 kB
🤖 This report was generated against 5726a85e58837117b2bb82441a4624bccf119dd7

@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

@@ -0,0 +1,7 @@
{

@github-actions github-actions Bot Jul 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Menu 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu.Nested Submenus Small Viewport Flipped.nested menu.chromium.png 670 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 605 Changed
vr-tests-react-components/Portal 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Portal.Apply Class Names.should have green border.chromium.png 15 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 628 Changed
vr-tests-react-components/Positioning.Positioning end.chromium.png 949 Changed
vr-tests-react-components/ProgressBar converged 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 2 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 47 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 69 Changed
vr-tests-react-components/TagPicker 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled.disabled input hover.chromium.png 677 Changed

There were 1 duplicate changes discarded. Check the build logs for more information.

@PaulGMardling
PaulGMardling marked this pull request as ready for review July 31, 2026 09:46
@PaulGMardling
PaulGMardling requested a review from a team as a code owner July 31, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant