Microsoft Edge is making changes to the way that websites can adjust their styles based on the user"s color and contrast preferences in Windows. Currently, many sites use the legacy CSS features "-ms-high-contrast" media query and "-ms-high-contrast-adjust" properties that were introduced in old Microsoft browsers, such as Internet Explorer and Microsoft Edge Legacy. However, Microsoft is now deprecating these legacy properties in favor of the new cross-browser "forced colors" standard.
Forced color mode, first implemented in Edge in 2020, allows websites to change their styling when the user enables high-contrast themes in Windows. This will standardize support across browsers such as Edge, Chrome, and Firefox.
During the transition, Microsoft Edge will continue to support the legacy "-ms" prefixed properties, so existing websites will not be immediately broken. However, Microsoft plans to completely remove support for these legacy properties in Edge 138 after a gradual deprecation process.
When we shipped the forced colors feature in Chromium-based Edge for the first time, we also wanted the websites that used the legacy CSS features from Internet Explorer and Microsoft Edge with the EdgeHTML engine to keep working. So, we maintained support for the -ms-high-contrast media query, and the -ms-high-contrast-adjust property.
We are planning to completely disable the legacy implementation by Edge 138, but this plan might change depending on the feedback that we receive during this deprecation trial.
The goal is to give site owners advance notice so that they can update their styles before they are disrupted. Microsoft will also contact known sites that use these properties to help ensure a smooth migration.
It is recommended that web developers adopt the new "forced colors" properties rather than relying on the old "-ms" properties. After Edge 138 is released, any styles tied to the old approach will no longer work.
To check your styles, you can disable the legacy implementation locally in Microsoft Edge:
- Open a new window or tab.
- Go to edge://flags/#edge-deprecate-ms-high-contrast in that tab.
- Enable the Deprecate ‘-ms-high-contrast’ and ‘-ms-high-contrast-adjust’ flag, and then restart Microsoft Edge.
With this change, Microsoft will help consolidate support for accessibility features. It will also help ensure that websites work consistently for all Edge users.