Share this article
Latest news
With KB5043178 to Release Preview Channel, Microsoft advises Windows 11 users to plug in when the battery is low
Copilot in Outlook will generate personalized themes for you to customize the app
Microsoft will raise the price of its 365 Suite to include AI capabilities
Death Stranding Director’s Cut is now Xbox X|S at a huge discount
Outlook will let users create custom account icons so they can tell their accounts apart easier
Microsoft Edge embraces modern standards: Legacy properties out, high-contrast themes in
The company plans to discontinue the legacy implementation by Edge 138
4 min. read
Published onApril 30, 2024
published onApril 30, 2024
Share this article
Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more
Microsoft announced the deprecation of the CSS -ms-high-contrast media query and -ms-high-contrast-adjust property.
The Redmond tech giant mentioned that they shifted their focus to the standard-based forced colors feature, introduced in Chromium-based browsers in 2020.
What is it all about?
Earlier, Microsoft Edge and Internet Explorer with the EdgeHTML engine supported these legacy features, which let sites fine-tune their appearance based on the user’s contrast theme settings.
However, with the transition to a Chromium-based browser, Microsoft strived to standardize support for contrast themes according to the new forced colors feature. The feature ensures compatibility across different browsers and extends support to Firefox.
In the Microsoft Edge blog, the company offered information on the forced colors feature:
Microsoft also mentioned that to avoid theinteroperability issues and to gather feedback, the company is planning to slowlydeprecate the legacy -ms-high-contrast media query and -ms-high-contrast-adjust property in Microsoft Edge.
They further mentioned that by Edge 138, they aim to disable the legacy implementation completely; however, the company may delay it depending on the feedback received during the deprecation period.
How can I test the deprecation early?
Launch the browser and open a new window or tab to disable the legacy implementation locally in Microsoft Edge. In the address bar, typeedge://flags/#edge-deprecate-ms-high-contrast
Next, enable theDeprecate ‘-ms-high-contrast’and‘-ms-high-contrast-adjust’flags, and then restart your browser.
This deprecation process will include a warning in theDevTools Console tool for any websites that use legacy properties in their stylesheets, starting with Microsoft Edge version 126.
How does Microsoft plan to phase out the legacy implementation?
To phase out the legacy implementation and ensure your site functions well after it’s deprecated, Microsoft is bringingOrigin Trial to Edge 132.
The Redmond tech giant also plans to contact accessibility testers and websites that are using legacy properties to avoid breakages when the properties are deprecated.
How can I update styles to the new forces colors standard?
In case your website relies on the legacy -ms-high-contrast media query and -ms-high-contrast-adjust property to edit styles when Windows’ contrast theme, Microsoft advises you to transition to the new forced colors mode standard before the legacy properties become obsolete.
The table shows the way legacy properties transferred to the new standards:
If you want to test forced colors mode on your website, you can change the Windows Settings on your device to use a contrast theme. For Windows 11, launchSettings>Accessibility>Contrast themes, choose a theme from the Contrast themes drop-down menu, and clickApply.
If you are using Windows 10, navigate to this:Settings>Accessibility>High contrast, then selectTurn on high contrast.
What do you think about this change? Share your experience with our readers in the comments section below.
More about the topics:microsoft edge browser
Srishti Sisodia
Windows Software Expert
Srishti Sisodia is an electronics engineer and writer with a passion for technology. She has extensive experience exploring the latest technological advancements and sharing her insights through informative blogs.
Her diverse interests bring a unique perspective to her work, and she approaches everything with commitment, enthusiasm, and a willingness to learn. That’s why she’s part of Windows Report’s Reviewers team, always willing to share the real-life experience with any software or hardware product. She’s also specialized in Azure, cloud computing, and AI.
User forum
0 messages
Sort by:LatestOldestMost Votes
Comment*
Name*
Email*
Commenting as.Not you?
Save information for future comments
Comment
Δ
Srishti Sisodia
Windows Software Expert
She is an electronics engineer and writer with a passion for technology. Srishti is specialized in Azure, cloud computing, and AI.