Skip to content

feat(themes): add forced-colors media styles - #2347

Merged
simeonoff merged 22 commits into
masterfrom
apetrov/forced-colors
Sep 8, 2026
Merged

feat(themes): add forced-colors media styles#2347
simeonoff merged 22 commits into
masterfrom
apetrov/forced-colors

Conversation

@adrianptrv

Copy link
Copy Markdown
Contributor

Closes: #2248

@simeonoff simeonoff changed the title feat(): add styles for the 'forced-colors:active' feature feat(themes): add styles for the 'forced-colors:active' feature Aug 24, 2026
@simeonoff simeonoff changed the title feat(themes): add styles for the 'forced-colors:active' feature feat(themes): add styles for the 'forced-colors: active' Aug 24, 2026
@simeonoff simeonoff changed the title feat(themes): add styles for the 'forced-colors: active' feat(themes): add forced-colors media styles Aug 24, 2026
@simeonoff
simeonoff marked this pull request as ready for review September 8, 2026 12:58
Copilot AI lite review requested due to automatic review settings September 8, 2026 12:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Several newly added forced-colors rules have correctness/consistency issues (selector robustness and lint-prone formatting/unit usage) that should be fixed before merging.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds @media (forced-colors: active) overrides across multiple components to improve High Contrast / Forced Colors support, aligning the theme layer with the accessibility requirements from #2248.

Changes:

  • Introduces forced-colors borders/outlines and state styling (hover/focus/active/disabled/selected) across many component theme SCSS files.
  • Adds new forced-colors styling scaffolding for resize-container and shared Bootstrap styles for linear progress, and wires the latter into the theme aggregator.
File summaries
File Description
src/components/validation-container/themes/validator.base.scss Add forced-colors text/icon color overrides for validation UI.
src/components/tree/themes/item.base.scss Add forced-colors outline styling for active/focused tree items.
src/components/tooltip/themes/tooltip.base.scss Add forced-colors border for tooltip surface.
src/components/toast/themes/toast.base.scss Add forced-colors border for toast host.
src/components/tile-manager/themes/tile.base.scss Add forced-colors border/hover indicators for resize triggers.
src/components/textarea/themes/shared/textarea.material.scss Add forced-colors focus/disabled styling for Material textarea.
src/components/textarea/themes/shared/textarea.indigo.scss Add forced-colors focus/disabled styling for Indigo textarea.
src/components/textarea/themes/shared/textarea.fluent.scss Add forced-colors focus/disabled styling for Fluent textarea.
src/components/textarea/themes/shared/textarea.common.scss Add forced-colors disabled helper/affix styling for textarea.
src/components/textarea/themes/shared/textarea.bootstrap.scss Add forced-colors focus/disabled styling for Bootstrap textarea.
src/components/tabs/themes/tab.base.scss Add forced-colors focus outline for selected tab header.
src/components/tabs/themes/shared/tabs/tabs.material.scss Add forced-colors selected-indicator border for Material tabs.
src/components/tabs/themes/shared/tabs/tabs.indigo.scss Add forced-colors selected-indicator border for Indigo tabs.
src/components/tabs/themes/shared/tabs/tabs.fluent.scss Add forced-colors selected-indicator border for Fluent tabs.
src/components/tabs/themes/shared/tab/tab.material.scss Add forced-colors hover/focus affordances for Material tabs.
src/components/tabs/themes/shared/tab/tab.indigo.scss Add forced-colors hover/selected-focus outlines for Indigo tabs.
src/components/tabs/themes/shared/tab/tab.fluent.scss Add forced-colors focus styling for Fluent tabs.
src/components/tabs/themes/shared/tab/tab.bootstrap.scss Add forced-colors borders/outlines for Bootstrap tab states.
src/components/stepper/themes/step/step.base.scss Add forced-colors outlines for hover/focus and indicator border.
src/components/splitter/themes/splitter.base.scss Add forced-colors borders for splitter bar and handle.
src/components/snackbar/themes/snackbar.base.scss Add forced-colors border for snackbar base.
src/components/slider/themes/slider.base.scss Add forced-colors borders and focused/disabled styling for slider parts.
src/components/slider/themes/shared/slider.material.scss Add forced-colors adjustments for Material slider thumb styling.
src/components/select/themes/shared/select.material.scss Minor formatting-only change.
src/components/select/themes/shared/select.bootstrap.scss Add forced-colors borders/disabled styling for Bootstrap select input.
src/components/select/themes/select.base.scss Add forced-colors borders and disabled text/validator styling for select.
src/components/resize-container/themes/resize-container.base.scss New base styles including forced-colors treatment for resize triggers.
src/components/radio/themes/shared/radio.indigo.scss Add forced-colors checked indicator sizing tweak for Indigo radio.
src/components/radio/themes/shared/radio.bootstrap.scss Add forced-colors checked indicator sizing tweak for Bootstrap radio.
src/components/radio/themes/radio.base.scss Add forced-colors checked/focus/disabled styling for radio.
src/components/progress/themes/linear/themes.ts Include new shared Bootstrap styles in both light/dark bootstrap themes.
src/components/progress/themes/linear/shared/linear.progress.bootstrap.scss New shared Bootstrap forced-colors tweak for linear progress.
src/components/progress/themes/linear/linear.progress.base.scss Add forced-colors track/fill outline/border for linear progress.
src/components/nav-drawer/themes/item.base.scss Add forced-colors outline and active color tokens for nav-drawer items.
src/components/list/themes/item.base.scss Add forced-colors selected outline for list items.
src/components/input/themes/shared/input.material.scss Add forced-colors outline and notch adjustments for Material input.
src/components/input/themes/shared/input.indigo.scss Add forced-colors ::after removal for Indigo input container.
src/components/file-input/themes/shared/file-input.bootstrap.scss Add forced-colors padding tweak for Bootstrap file selector button.
src/components/file-input/themes/file-input.base.scss Add forced-colors padding tweak for file selector button.
src/components/dropdown/themes/dropdown.base.scss Add forced-colors border for dropdown surface.
src/components/dropdown/themes/dropdown-item.base.scss Add forced-colors hover/selected/disabled/active styling for dropdown items.
src/components/divider/themes/divider.base.scss Add forced-colors thicker divider borders and dashed variants.
src/components/date-range-picker/predefined-ranges-area.base.scss Add forced-colors border styling for ranges area and chips.
src/components/date-range-picker/date-range-picker.base.scss Add forced-colors borders for calendar/actions within the focus trap.
src/components/date-picker/themes/date-picker.base.scss Add forced-colors borders for calendar/actions within the focus trap.
src/components/combo/themes/shared/combo.bootstrap.scss Add forced-colors border/disabled styling for Bootstrap combo input.
src/components/combo/themes/combo.base.scss Add forced-colors borders/outlines and disabled styling for combo list/input.
src/components/combo/themes/combo-item.base.scss Add forced-colors checkbox control border color in combo items.
src/components/color-picker/themes/color-picker.base.scss Add forced-colors adjustments for anchor/canvas/track rendering.
src/components/checkbox/themes/switch.base.scss Add forced-colors focus/hover/disabled styling for switch.
src/components/checkbox/themes/shared/switch/switch.material.scss Add forced-colors thumb border/hover sizing for Material switch.
src/components/checkbox/themes/shared/switch/switch.indigo.scss Add forced-colors thumb border and focus outline width for Indigo switch.
src/components/checkbox/themes/shared/switch/switch.fluent.scss Add forced-colors thumb border for Fluent switch.
src/components/checkbox/themes/shared/switch/switch.bootstrap.scss Add forced-colors thumb border and focus outline width for Bootstrap switch.
src/components/checkbox/themes/shared/checkbox/checkbox.fluent.scss Add forced-colors transparent fills + border/focus behavior for Fluent checkbox.
src/components/checkbox/themes/shared/checkbox/checkbox.bootstrap.scss Add forced-colors transparent fills + border/focus behavior for Bootstrap checkbox.
src/components/checkbox/themes/checkbox.base.scss Add forced-colors tick/disabled/focus/hover styling for checkbox base.
src/components/chat/themes/message.base.scss Add forced-colors border for chat message container.
src/components/chat/themes/chat.base.scss Add forced-colors header separator styling for chat.
src/components/carousel/themes/shared/carousel.indigo.scss Add forced-colors dot border styling for Indigo carousel indicators.
src/components/carousel/themes/carousel.base.scss Add forced-colors dot active/hover styling for carousel indicators.
src/components/card/themes/container.base.scss Add forced-colors border for elevated cards.
src/components/calendar/themes/year-month-view.base.scss Add forced-colors outlines for hover/current/selected in year-month view.
src/components/calendar/themes/shared/material/days-view.material.scss Add forced-colors tweaks for special/week-number/range selection in Material days view.
src/components/calendar/themes/shared/indigo/days-view.indigo.scss Add forced-colors week-number border adjustments for Indigo days view.
src/components/calendar/themes/shared/indigo/calendar.indigo.scss Add forced-colors content/navigation borders for Indigo calendar.
src/components/calendar/themes/shared/fluent/days-view.fluent.scss Add forced-colors range/current/preview border adjustments for Fluent days view.
src/components/calendar/themes/shared/bootstrap/days-view.bootstrap.scss Add forced-colors range/preview border adjustments for Bootstrap days view.
src/components/calendar/themes/shared/bootstrap/calendar.bootstrap.scss Add forced-colors content/header/navigation borders for Bootstrap calendar.
src/components/calendar/themes/days-view.base.scss Add forced-colors token overrides for current/selected/disabled/range states.
src/components/calendar/themes/calendar.base.scss Add forced-colors header border styling for calendar.
src/components/banner/themes/shared/banner.indigo.scss Add forced-colors border for Indigo banner spacer.
src/components/banner/themes/banner.base.scss Add forced-colors border separator for banner spacer.
src/components/badge/themes/badge.base.scss Add forced-colors border for badge base.
src/components/avatar/themes/avatar.base.scss Add forced-colors border for avatar base.
Review details
  • Files reviewed: 74/75 changed files
  • Comments generated: 6
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/components/slider/themes/shared/slider.material.scss
Comment thread src/components/combo/themes/combo.base.scss
Comment thread src/components/date-picker/themes/date-picker.base.scss
Comment thread src/components/dropdown/themes/dropdown-item.base.scss
Comment thread src/components/input/themes/shared/input.material.scss
Comment thread src/components/list/themes/item.base.scss
simeonoff and others added 4 commits September 8, 2026 17:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
simeonoff and others added 2 commits September 8, 2026 17:44
…o-element

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@simeonoff
simeonoff merged commit dfa7202 into master Sep 8, 2026
7 checks passed
@simeonoff
simeonoff deleted the apetrov/forced-colors branch September 8, 2026 14:50
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.

Themes: Add support for forced-color: active media feature

5 participants