mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 10:57:34 +09:00
Issue #1826 - Add typed calc() arithmetic for media queries
This commit is contained in:
parent
8af3f489da
commit
79800a9113
4 changed files with 134 additions and 17 deletions
|
|
@ -321,6 +321,21 @@ function run() {
|
|||
(Math.floor(value/em_size) - 1) + "rem)");
|
||||
}
|
||||
|
||||
change_state(function() {
|
||||
iframe_style.width = "100px";
|
||||
iframe_style.height = "10px";
|
||||
});
|
||||
should_apply("all and (width: calc(100px / 1em * 1em))");
|
||||
should_apply("all and (width: calc((50vh * 5em) / 4px))");
|
||||
should_apply("all and (width: calc(10vw / 10px * 1000vh))");
|
||||
should_apply("all and (width: calc(8000vh * 1vw / 1em * 8px / 40vh))");
|
||||
should_not_apply("all and (width: calc(100px / 1em * 2em))");
|
||||
|
||||
change_state(function() {
|
||||
iframe_style.width = width_val + "px";
|
||||
iframe_style.height = height_val + "px";
|
||||
});
|
||||
|
||||
change_state(function() {
|
||||
iframe_style.width = "0";
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue