Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1658780] Update the prefers-contrast media query to use the new more/less keywords #25031

Merged
merged 1 commit into from
Aug 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions css/mediaqueries/prefers-contrast.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<script>
query_should_be_css_parseable("(prefers-contrast)");
query_should_be_css_parseable("(prefers-contrast: no-preference)");
query_should_be_css_parseable("(prefers-contrast: high)");
query_should_be_css_parseable("(prefers-contrast: low)");
query_should_be_css_parseable("(prefers-contrast: more)");
query_should_be_css_parseable("(prefers-contrast: less)");
query_should_be_css_parseable("(prefers-contrast: forced)");

query_should_not_be_css_parseable("(prefers-contrast: increase)");
Expand All @@ -18,11 +18,13 @@
query_should_not_be_css_parseable("(prefers-contrast > increase)");
query_should_not_be_css_parseable("(prefers-increased-contrast)");
query_should_not_be_css_parseable("(prefers-decreased-contrast)");
query_should_not_be_css_parseable("(prefers-contrast: high)");
query_should_not_be_css_parseable("(prefers-contrast: low)");

query_should_be_js_parseable("(prefers-contrast)");
query_should_be_js_parseable("(prefers-contrast: no-preference)");
query_should_be_js_parseable("(prefers-contrast: high)");
query_should_be_js_parseable("(prefers-contrast: low)");
query_should_be_js_parseable("(prefers-contrast: more)");
query_should_be_js_parseable("(prefers-contrast: less)");
query_should_be_js_parseable("(prefers-contrast: forced)");

query_should_not_be_js_parseable("(prefers-contrast: increase)");
Expand All @@ -32,6 +34,8 @@
query_should_not_be_js_parseable("(prefers-contrast > increase)");
query_should_not_be_js_parseable("(prefers-increased-contrast)");
query_should_not_be_js_parseable("(prefers-decreased-contrast)");
query_should_not_be_js_parseable("(prefers-contrast: high)");
query_should_not_be_js_parseable("(prefers-contrast: low)");

test(() => {
// no-preference is the default and all other values evaluate to
Expand Down