HomeGame GuidesMicrosoft Edge disables legacy features for high-contrast themes

Microsoft Edge disables legacy features for high-contrast themes

Published on

Microsoft Edge is making changes to how websites can adjust their styles based on the color and contrast preferences of the Windows user. Currently, many sites use the legacy CSS “-ms-high-contrast” media query and “-ms-high-contrast-adjust” properties introduced in older Microsoft browsers, such as Internet Explorer and Microsoft Edge Legacy. However, Microsoft Now deprecated These legacy features favor the new “forced colors” standard between browsers.

Forced color mode, first embedded In Edge in 2020, allows sites to change their style when the user enables high-contrast themes in Windows. This will fix support for browsers like Edge, Chrome and Firefox.

During the transition, Microsoft Edge will continue to support the old “-ms” prefix properties, so existing sites won’t break immediately. However, Microsoft plans to completely remove support for these legacy features on Edge 138 after a phase-out process.

When we first shipped the forced colors feature in Chromium-based Edge, we also wanted websites that used the legacy CSS features from Internet Explorer and Microsoft Edge with the EdgeHTML engine to continue to work. Therefore, we have retained support for the -ms-high-contrast media query, and the -ms-high-contrast-adjust property.

We plan to completely disable the legacy app by Edge 138, but that plan may change based on feedback we receive during this deprecation experiment.

The goal is to give site owners advance notice so they can update their styles before they are violated. Microsoft will also contact known sites that use these features to ensure a smooth transition.

Web developers are encouraged to adopt the new “force colors” properties instead of relying on the old “-ms” properties. After Edge 138 is released, any styles associated with the old approach will no longer work.

To test your styles, you can disable the legacy application in Microsoft Edge:

  • Open a new window or tab.
  • Go to edge://flags/#edge-deprecate-ms-high-contrast in this tab.
  • Enable the ‘-ms-high-contrast’ and ‘-ms-high-contrast-adjust’ flags and then restart Microsoft Edge.

With this change, Microsoft will help unify support for accessibility features. It will also help ensure that websites work consistently for all Edge users.

Latest articles

More like this