Needs work
Project:
Drupal core
Version:
main
Component:
CSS
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Dec 2022 at 14:11 UTC
Updated:
8 Jul 2025 at 13:21 UTC
Jump to comment: Most recent, Most recent file
Follow up from #3321006: Drop -ms- vendor prefixed CSS properties
Microsoft is deprecating -ms-high-contrast and -ms-high-contrast-adjust. We need to update our CSS accordingly.
NA
-ms-high-contrast to forced-colors
-ms-high-contrast-adjust to forced-color-adjust.
The Microsoft deprecation notice has instructions for conversion, and there are examples in commit ab4a24f9 for #3269341: Claro <details> element not rendering properly in forced colors.
system-color
mask-image
mask shorthand
NA
NA
NA
NA
| Comment | File | Size | Author |
|---|
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jitender vaidhIgnore this patch.
Comment #3
jitender vaidhI removed -ms-high-contrast this CSS property from Olivero themes folder.
Comment #4
jitender vaidhComment #5
gauravvvv commentedOne file
drupal/core/themes/stable9/css/core/normalize-fixes.csswas left. I have added the updated patch along with interdiff. Please review.Comment #6
longwaveI am pretty sure that this one and some similar ones are by design - they provide an alternative version of the image when Windows is in high-contrast mode.
Comment #7
smustgrave commentedI never filled in the IS complete so that will need to be done.
Comment #6 sounds like this could introduce accessibility issues so those probably should be looked at.
Comment #8
jitender vaidhComment #9
smustgrave commentedFor the IS update
Comment #13
nayana_mvr commentedI have re-rolled the patch for D11 and raised MR. Updated TODO items in the Issue Summary. Please check if it's fine.
Comment #14
smustgrave commentedDon't believe accessibility is needed since this is now dropping IE code.
Hiding patches for MR.
left a comment on MR.
Comment #15
nayana_mvr commentedComment #16
smustgrave commentedFeedback appears addressed
Comment #17
catchNo-one responded to @longwave in #6 properly, that should have happened before this was worked on and marked RTBC.
It looks like we should be replacing the media selector with https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-contrast and/or maybe forced-colors, rather than just removing these styles, someone who knows CSS/accessibility things more should confirm though.
Comment #18
groendijk commentedCame across this issue: https://www.drupal.org/project/drupal/issues/3167032, talking about
-ms-high-contrasttoo.Comment #19
mgiffordThis is now a depreciated tag https://blogs.windows.com/msedgedev/2024/04/29/deprecating-ms-high-contr...
So yes, we should remove this and rebuild the functionality with The forced-colors media query.
Comment #20
kentr commentedUpdated the title and IS to reflect that the code must be converted to use
forced-colorsrather than removed.RE @longwave's comment, #6:
I suggest converting background image cases to
mask-imageormaskusing the original (full-color) image and using the appropriatesystem-coloras the background.There are many examples of the technique in Claro. I linked to a couple in the IS.
Comment #21
mgiffordI like your suggestion around use of
mask-imageormask@kentr.