Open Bug 1506364 Opened 10 months ago Updated 3 months ago

Implement the prefers-contrast media-query.

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

65 Branch
enhancement

Tracking

()

People

(Reporter: bugzilla, Unassigned)

References

(Blocks 2 open bugs, )

Details

Attachments

(1 file)

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
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.