W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2020

[csswg-drafts] [css-color-adjust] Should forced-colors override `border-image`? (#5469)

From: Taylor Hunt via GitHub <sysbot+gh@w3.org>
Date: Tue, 25 Aug 2020 16:42:06 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-685633494-1598373725-sysbot+gh@w3.org>
tigt has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-adjust] Should forced-colors override `border-image`? ==
[CSS Color Adjustment Module Level 1](https://drafts.csswg.org/css-color-adjust-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:

```css
@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:

- [Writing CSS for High-Contrast Mode](https://codepen.io/tigt/post/writing-css-for-high-contrast-mode) — what I thought when I encountered the problem
- [High-Contrast Mode Styles tester pen](https://codepen.io/tigt/pen/wORmqX) — Reduced test case for properties I was suspicious of, like `border-image`, `content: url()`, and `filter`.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5469 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 25 August 2020 16:42:08 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:13 UTC