-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-grid] Correctly stretch a replaced element in both axes
As discussed in w3c/csswg-drafts#5713 Change-Id: I90c8bd9c5516d11cae6798d7d7cb6c679e166994 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2651651 Commit-Queue: Christian Biesinger <[email protected]> Reviewed-by: Oriol Brufau <[email protected]> Reviewed-by: Javier Fernandez <[email protected]> Reviewed-by: Ian Kilpatrick <[email protected]> Auto-Submit: Christian Biesinger <[email protected]> Cr-Commit-Position: refs/heads/master@{#848107} GitOrigin-RevId: 2ba07b2385593e296bb69271b4c27402a6d929c3
- Loading branch information
1 parent
049a80c
commit c4359c5
Showing
12 changed files
with
102 additions
and
1 deletion.
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
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
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
10 changes: 10 additions & 0 deletions
10
...b_tests/external/wpt/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-004.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> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5713"> | ||
<meta name="assert" content="If stretch alignment is applied to both axis the aspect-ratio of a replaced element is ignored."> | ||
|
||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> | ||
|
||
<div style="display: grid; grid-template: 100px / 100px; width: 100px; height: 100px; background: red;"> | ||
<img src="support/25x50-green.png" width=25 height=50 style="background: green; align-self: stretch; justify-self: stretch; width: auto; height: auto;"></img> | ||
</div> |
10 changes: 10 additions & 0 deletions
10
...b_tests/external/wpt/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-005.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> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5713"> | ||
<meta name="assert" content="If stretch alignment is applied to both axis the aspect-ratio of a replaced element is ignored."> | ||
|
||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> | ||
|
||
<div style="display: grid; grid-template: 100px / 100px; width: 100px; height: 100px; background: red;"> | ||
<img src="support/25x50-green.png" width=25 height=50 style="background: green; align-self: stretch; justify-self: stretch; width: auto; height: auto; writing-mode: vertical-lr;"></img> | ||
</div> |
10 changes: 10 additions & 0 deletions
10
...b_tests/external/wpt/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-006.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> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5713"> | ||
<meta name="assert" content="If stretch alignment is applied to both axis the aspect-ratio of a replaced element is ignored, but not when auto margins are present."> | ||
|
||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> | ||
|
||
<div style="display: grid; grid-template: 100px / 500px; width: 100px; height: 100px; background: red;"> | ||
<img src="support/50x50-green.png" width=50 height=50 style="background: green; align-self: stretch; justify-self: stretch; width: auto; height: auto; margin-right: auto;"></img> | ||
</div> |
10 changes: 10 additions & 0 deletions
10
...b_tests/external/wpt/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-007.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> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5713"> | ||
<meta name="assert" content="If stretch alignment is applied to both axis the aspect-ratio of a replaced element is ignored, but not when auto margins are present."> | ||
|
||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> | ||
|
||
<div style="display: grid; grid-template: 500px / 100px; width: 100px; height: 100px; background: red;"> | ||
<img src="support/50x50-green.png" width=50 height=50 style="background: green; align-self: stretch; justify-self: stretch; width: auto; height: auto; margin-bottom: auto;"></img> | ||
</div> |
10 changes: 10 additions & 0 deletions
10
...b_tests/external/wpt/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-008.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> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5713"> | ||
<meta name="assert" content="Stretch alignment in one axis should apply aspect-ratio in the other"> | ||
|
||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> | ||
|
||
<div style="display: grid; grid-template: 100px / 100px; width: 100px; height: 100px; background: red;"> | ||
<img src="support/50x50-green.png" width=50 height=50 style="background: green; justify-self: stretch; width: auto; height: auto;"></img> | ||
</div> |
10 changes: 10 additions & 0 deletions
10
...b_tests/external/wpt/css/css-grid/alignment/replaced-alignment-with-aspect-ratio-009.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> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5713"> | ||
<meta name="assert" content="Stretch alignment in one axis should apply aspect-ratio in the other"> | ||
|
||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> | ||
|
||
<div style="display: grid; grid-template: 100px / 100px; width: 100px; height: 100px; background: red;"> | ||
<img src="support/50x50-green.png" width=50 height=50 style="background: green; align-self: stretch; width: auto; height: auto;"></img> | ||
</div> |
Binary file added
BIN
+99 Bytes
blink/web_tests/external/wpt/css/css-grid/alignment/support/25x50-green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+205 Bytes
blink/web_tests/external/wpt/css/css-grid/alignment/support/50x50-green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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