-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1827564 [wpt PR 39488] - Handle min/max sizes in non-replaced pos…
…itioned boxes, a=testonly Automatic update from web-platform-tests Handle min/max sizes in non-replaced positioned boxes -- wpt-commits: dca730d002f78ee7b215cadd3b1e625255da8077 wpt-pr: 39488
- Loading branch information
1 parent
625e5d4
commit 5c94b85
Showing
5 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
testing/web-platform/tests/css/CSS2/positioning/absolute-non-replaced-max-001-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,7 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<link rel="author" name="Delan Azabani" href="mailto:dazabani@igalia.com"> | ||
<p>Test passes if there is a green square containing a smaller black square below. | ||
<div style="width: 2em; height: 2em; background: green;"> | ||
<div style="width: 1em; height: 1em; background: black;"></div> | ||
</div> |
12 changes: 12 additions & 0 deletions
12
testing/web-platform/tests/css/CSS2/positioning/absolute-non-replaced-max-001.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,12 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>CSS Test: ‘max-width’ and ‘max-height’ affect percentage sizes in descendants</title> | ||
<link rel="author" name="Delan Azabani" href="mailto:dazabani@igalia.com"> | ||
<link rel="help" href="https://drafts.csswg.org/css2/#min-max-widths"> | ||
<link rel="help" href="https://drafts.csswg.org/css2/#min-max-heights"> | ||
<link rel="match" href="absolute-non-replaced-max-001-ref.html"> | ||
<meta name="assert" value="This test verifies that when the used ‘width’ and ‘height’ are affected by ‘max-width’ and ‘max-height’, the descendants are laid out with a containing block of the new size, so any percentage sizes are resolved against that new size."> | ||
<p>Test passes if there is a green square containing a smaller black square below. | ||
<div style="position: absolute; width: 4em; height: 4em; max-width: 2em; max-height: 2em; background: green;"> | ||
<div style="width: 50%; height: 50%; background: black;"></div> | ||
</div> |
12 changes: 12 additions & 0 deletions
12
testing/web-platform/tests/css/CSS2/positioning/absolute-non-replaced-min-001.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,12 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>CSS Test: ‘min-width’ and ‘min-height’ affect percentage sizes in descendants</title> | ||
<link rel="author" name="Delan Azabani" href="mailto:dazabani@igalia.com"> | ||
<link rel="help" href="https://drafts.csswg.org/css2/#min-max-widths"> | ||
<link rel="help" href="https://drafts.csswg.org/css2/#min-max-heights"> | ||
<link rel="match" href="absolute-non-replaced-min-max-001-ref.html"> | ||
<meta name="assert" value="This test verifies that when the used ‘width’ and ‘height’ are affected by ‘min-width’ and ‘min-height’, the descendants are laid out with a containing block of the new size, so any percentage sizes are resolved against that new size."> | ||
<p>Test passes if there is a green square below. | ||
<div style="position: absolute; width: 0; height: 0; min-width: 1em; min-height: 1em; background: black;"> | ||
<div style="width: 100%; height: 100%; background: green;"></div> | ||
</div> |
5 changes: 5 additions & 0 deletions
5
testing/web-platform/tests/css/CSS2/positioning/absolute-non-replaced-min-max-001-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,5 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<link rel="author" name="Delan Azabani" href="mailto:dazabani@igalia.com"> | ||
<p>Test passes if there is a green square below. | ||
<div style="width: 1em; height: 1em; background: green;"></div> |
10 changes: 10 additions & 0 deletions
10
testing/web-platform/tests/css/CSS2/positioning/absolute-non-replaced-min-max-001.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,10 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>CSS Test: ‘min-width’ and ‘min-height’ take precedence over ‘max-width’ and ‘max-height’ when contradictory</title> | ||
<link rel="author" name="Delan Azabani" href="mailto:dazabani@igalia.com"> | ||
<link rel="help" href="https://drafts.csswg.org/css2/#min-max-widths"> | ||
<link rel="help" href="https://drafts.csswg.org/css2/#min-max-heights"> | ||
<link rel="match" href="absolute-non-replaced-min-max-001-ref.html"> | ||
<meta name="assert" value="This test verifies that when ‘min-width’ is greater than ‘max-width’, or ‘min-height’ is greater than ‘max-height’, the minimums take precedence, because the steps that recalculate sizes and margins for the minimums (step 3) come after the steps for the maximums (step 2)."> | ||
<p>Test passes if there is a green square below. | ||
<div style="position: absolute; width: 0; height: 0; min-width: 1em; min-height: 1em; max-width: 0; max-height: 0; background: green;"></div> |