Support range media query syntax

This commit is contained in:
Basilisk-Dev 2026-05-11 17:54:07 -04:00 committed by wuggy
commit 667a753448
4 changed files with 62 additions and 6 deletions

View file

@ -290,6 +290,12 @@ function run() {
should_apply("all and (max-" + feature + ": " + value + "px)");
should_apply("all and (max-" + feature + ": " + (value + 1) + "px)");
should_not_apply("all and (max-" + feature + ": " + (value - 1) + "px)");
should_apply("all and (" + feature + " >= " + value + "px)");
should_not_apply("all and (" + feature + " > " + value + "px)");
should_apply("all and (" + feature + " > " + (value - 1) + "px)");
should_apply("all and (" + feature + " <= " + value + "px)");
should_not_apply("all and (" + feature + " < " + value + "px)");
should_apply("all and (" + feature + " < " + (value + 1) + "px)");
should_not_apply("all and (min-" + feature + ": " +
(Math.ceil(value/em_size) + 1) + "em)");
should_apply("all and (min-" + feature + ": " +
@ -349,6 +355,9 @@ function run() {
should_apply("(orientation: landscape)");
should_not_apply("(orientation: portrait)");
should_apply("not all and (orientation: portrait)");
expression_should_not_be_parseable("orientation > landscape");
expression_should_not_be_parseable("min-width > 1px");
expression_should_not_be_parseable("width >");
// ratio that reduces to 59/80
change_state(function() {
iframe_style.height = "320px";