Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: LayoutTests/fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html

Issue 450093004: [CSS Grid Layout] Handle percentages of indefinite sizes in minmax() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing v3 Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html
diff --git a/LayoutTests/fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html b/LayoutTests/fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html
new file mode 100644
index 0000000000000000000000000000000000000000..e237bc3ef92295b7c6d6220242761086310ec8cc
--- /dev/null
+++ b/LayoutTests/fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<link href="resources/grid.css" rel="stylesheet">
+<style>
+.indefiniteSizeGrid {
+ font: 10px/1 Ahem;
+}
+.gridWithPercent {
+ grid-auto-columns: 25%;
+ grid-auto-rows: 30%;
+}
+.gridWithPercentInMinOfMinMax {
+ grid-auto-columns: minmax(20%, max-content);
+ grid-auto-rows: minmax(100%, 15px);
+}
+.gridWithPercentInMinOfMinMax2 {
+ grid-auto-columns: minmax(20%, 50px);
+ grid-auto-rows: minmax(100%, max-content);
+}
+.gridWithPercentInMaxOfMinMax {
+ grid-auto-columns: minmax(min-content, 25%);
+ grid-auto-rows: minmax(0px, 1%);
+}
+.gridWithPercentInMaxOfMinMax2 {
+ grid-auto-columns: minmax(20px, 25%);
+ grid-auto-rows: minmax(min-content, 1%);
+}
+.gridWithPercentsInMinMax {
+ grid-auto-columns: minmax(25%, 50%);
+ grid-auto-rows: minmax(10%, 90%);
+}
+</style>
+<script src="../../resources/check-layout.js"></script>
+<body onload="checkLayout('.indefiniteSizeGrid');">
+<p>This test checks that percentages of indefinite sizes are treated as min-content (for the min track sizing function) or max-content (for the max track sizing function).</p>
+<div style="position: relative;">
+ <div class="indefiniteSizeGrid gridWithPercent" data-expected-width="30" data-expected-height="20">
+ <div class="firstRowFirstColumn">XXX<br>XXX</div>
+ </div>
+</div>
+<div style="position: relative;">
+ <div class="indefiniteSizeGrid gridWithPercentInMinOfMinMax" data-expected-width="30" data-expected-height="15">
+ <div class="firstRowFirstColumn">XXX</div>
+ <div class="firstRowFirstColumn">XX XX</div>
+ </div>
+</div>
+<div style="position: relative;">
+ <div class="indefiniteSizeGrid gridWithPercentInMinOfMinMax2" data-expected-width="30" data-expected-height="20">
+ <div class="firstRowFirstColumn">XXX</div>
+ <div class="firstRowFirstColumn">XX XX</div>
+ </div>
+</div>
+<div style="position: relative;">
+ <div class="indefiniteSizeGrid gridWithPercentInMaxOfMinMax" data-expected-width="40" data-expected-height="20">
+ <div class="firstRowFirstColumn">XXXX<br>X</div>
+ </div>
+</div>
+<div style="position: relative;">
+ <div class="indefiniteSizeGrid gridWithPercentInMaxOfMinMax2" data-expected-width="20" data-expected-height="20">
+ <div class="firstRowFirstColumn">XXXX<br>X</div>
+ </div>
+</div>
+<div style="position: relative;">
+ <div class="indefiniteSizeGrid gridWithPercentsInMinMax" data-expected-width="40" data-expected-height="40">
+ <div class="firstRowFirstColumn">XXX<br>XX XX<br>XXXX</div>
+ </div>
+</div>
+</body>

Powered by Google App Engine
This is Rietveld 408576698