forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1832481 - Container units should prevent us from using the rule c…
…ache. r=dshin Much like with font-relative units, when they're used for a non-inherited property we need to avoid using the rule cache. This is because two elements matching the same rules won't get guaranteed-equal non-inherited style structs. Depends on D177732 Differential Revision: https://phabricator.services.mozilla.com/D177733
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
.../web-platform/tests/css/css-contain/container-queries/container-units-rule-cache-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<style> | ||
.container { | ||
width: 100px; | ||
} | ||
|
||
.half { | ||
height: 50%; | ||
background-color: green; | ||
} | ||
</style> | ||
<div class="container" style="height: 100px"> | ||
<div class="half"></div> | ||
</div> | ||
<div class="container" style="height: 200px"> | ||
<div class="half"></div> | ||
</div> |
24 changes: 24 additions & 0 deletions
24
testing/web-platform/tests/css/css-contain/container-queries/container-units-rule-cache.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-lengths"> | ||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1832481"> | ||
<link rel="author" href="mailto:[email protected]" title="Emilio Cobos Álvarez"> | ||
<link rel="author" href="https://mozilla.org" title="Mozilla"> | ||
<link rel="match" href="container-units-rule-cache-ref.html"> | ||
<style> | ||
.container { | ||
width: 100px; | ||
container-type: size; | ||
} | ||
|
||
.half { | ||
height: 50cqh; | ||
background-color: green; | ||
} | ||
</style> | ||
<div class="container" style="height: 100px"> | ||
<div class="half"></div> | ||
</div> | ||
<div class="container" style="height: 200px"> | ||
<div class="half"></div> | ||
</div> |