Skip to content

fix(web-components): remove behaviors for forced-colors and match-media directives#36092

Merged
chrisdholt merged 2 commits into
microsoft:masterfrom
chrisdholt:users/chhol/remove-with-behaviors-from-wc
May 5, 2026
Merged

fix(web-components): remove behaviors for forced-colors and match-media directives#36092
chrisdholt merged 2 commits into
microsoft:masterfrom
chrisdholt:users/chhol/remove-with-behaviors-from-wc

Conversation

@chrisdholt
Copy link
Copy Markdown
Member

Previous Behavior

Behaviors required JS to attach and remove stylesheets for forced-colors.

New Behavior

This implementation will be removed in the upcoming release of FAST v3 to better support declarative scenarios. The behaviors have been removed. If using the forcedColorsStylesheetBehavior(), move those styles into the CSS files directly with a media query.

Related Issue(s)

  • Fixes #

@chrisdholt chrisdholt requested a review from a team as a code owner May 5, 2026 05:12
@chrisdholt chrisdholt changed the title remove behaviors for forced-colors and match-media directives fix(web-components): remove behaviors for forced-colors and match-media directives May 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

📊 Bundle size report

✅ No changes found

@media query

The web-components package removed the forcedColorsStylesheetBehavior export
and withBehaviors API. Update chart-web-components donut-chart and
horizontal-bar-chart styles to use native @media (forced-colors: active)
instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@chrisdholt chrisdholt merged commit f00737e into microsoft:master May 5, 2026
11 checks passed
@chrisdholt chrisdholt deleted the users/chhol/remove-with-behaviors-from-wc branch May 5, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants