Skip to content

[css-color-adjust] Should forced-colors override border-image? #5469

@tigt

Description

@tigt

CSS Color Adjustment Module Level 1

I recently worked on a component library to make it play nice with Windows High-Contrast Mode, and I noticed HCM left its border-image styles untouched, which rendered some components visually inaccessible. I added the following CSS to fix the problem:

@media (-ms-high-contrast: active) {
  *, ::before, ::after {
    border-image: none !important;
    list-style-image: none !important; /* IE/Edge didn’t override this either at the time */
  }
}

Since border-image is specced to require a fallback border-style in order for the image to display at all (and I think Chromium patched their bug about that), it seems like it would be safe to include this as part of forced-color rendering.

I wrote some more about this at the time I encountered it:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions