Implement the prefers-contrast media-query.

NEW
Unassigned

Status

()

P3
enhancement
3 months ago
3 months ago

People

(Reporter: bugzilla, Unassigned)

Tracking

65 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

3 months ago
Created attachment 9024195 [details]
Screenshot 2018-11-10 at 15.35.45.png

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36

Steps to reproduce:

If the user set high contrast to “checked” in macOS, we can assume he or she will need high contrast in web sites as well. If we can add the feature to CSS that we can detect high contrast mode using CSS, it would be great.

@media (prefers-high-contrast: true) {
  /* CSS code */
}

Implementation could be much like prefers-reduced-motion https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion

Comment 1

3 months ago
Hi Johan Ronsse,

I will set this issue as an enhancement for now. Hopefully, the component is the right one, if not please feel free to add it to the right one.

Thanks for the report!
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Component: Untriaged → CSS Parsing and Computation
Ever confirmed: true
Product: Firefox → Core
There's actually something resembling a spec for this: https://drafts.csswg.org/mediaqueries-5/#prefers-contrast
Priority: -- → P3
Summary: Enable interplay between macOS high contrast setting and CSS → Implement the prefers-contrast media-query.
You need to log in before you can comment on or make changes to this bug.