Index: LayoutTests/fast/css-grid-layout/grid-content-alignment-with-span-vertical-rl.html |
diff --git a/LayoutTests/fast/css-grid-layout/grid-content-alignment-with-span-vertical-rl.html b/LayoutTests/fast/css-grid-layout/grid-content-alignment-with-span-vertical-rl.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2bb9603b2a15b33e5e82c48e0b33614cd7a4fff1 |
--- /dev/null |
+++ b/LayoutTests/fast/css-grid-layout/grid-content-alignment-with-span-vertical-rl.html |
@@ -0,0 +1,148 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<link href="resources/grid.css" rel="stylesheet"> |
+<script src="../../resources/check-layout.js"></script> |
+<style> |
+body { |
+ margin: 0px; |
+} |
+ |
+.grid { |
+ grid-auto-columns: 20px; |
+ grid-auto-rows: 40px; |
+ grid-template-areas: "a a b" |
+ "c d b"; |
+ position: relative; |
+ width: 200px; |
+ height: 300px; |
+} |
+.a { |
+ grid-area: a; |
+ background-color: blue; |
+} |
+.b { |
+ grid-area: b; |
+ background-color: lime; |
+} |
+.c { |
+ grid-area: c; |
+ background-color: purple; |
+} |
+.d { |
+ grid-area: d; |
+ background-color: orange; |
+} |
+.stretchedGrid { |
+ grid-auto-columns: auto; |
+ grid-auto-rows: auto; |
+} |
+ |
+.spaceBetween { |
+ justify-content: space-between; |
+ align-content: space-between; |
+} |
+ |
+.spaceAround { |
+ justify-content: space-around; |
+ align-content: space-around; |
+} |
+ |
+.spaceEvenly { |
+ justify-content: space-evenly; |
+ align-content: space-evenly; |
+} |
+ |
+.stretch { |
+ justify-content: stretch; |
+ align-content: stretch; |
+} |
+</style> |
+</head> |
+<body onload="checkLayout('.grid')"> |
+ |
+<p>This test checks that Content Distribution alignment is applied correctly when items span more than one track.</p> |
+ |
+<div style="position: relative"> |
+ <p>direction: LTR | distribution: 'space-between'</p> |
+ <div class="grid spaceBetween verticalRL" data-expected-width="200" data-expected-height="300"> |
+ <div class="a" data-offset-x="160" data-offset-y="0" data-expected-width="40" data-expected-height="160"></div> |
+ <div class="b" data-offset-x="0" data-offset-y="280" data-expected-width="200" data-expected-height="20"></div> |
+ <div class="c" data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="20"></div> |
+ <div class="d" data-offset-x="0" data-offset-y="140" data-expected-width="40" data-expected-height="20"></div> |
+ </div> |
+</div> |
+ |
+<div style="position: relative"> |
+ <p>direction: LTR | distribution: 'space-around'</p> |
+ <div class="grid spaceAround verticalRL" data-expected-width="200" data-expected-height="300"> |
+ <div class="a" data-offset-x="130" data-offset-y="40" data-expected-width="40" data-expected-height="120"></div> |
+ <div class="b" data-offset-x="30" data-offset-y="240" data-expected-width="140" data-expected-height="20"></div> |
+ <div class="c" data-offset-x="30" data-offset-y="40" data-expected-width="40" data-expected-height="20"></div> |
+ <div class="d" data-offset-x="30" data-offset-y="140" data-expected-width="40" data-expected-height="20"></div> |
+ </div> |
+</div> |
+ |
+<div style="position: relative"> |
+ <p>direction: LTR | distribution: 'space-evenly'</p> |
+ <div class="grid spaceEvenly verticalRL" data-expected-width="200" data-expected-height="300"> |
+ <div class="a" data-offset-x="120" data-offset-y="60" data-expected-width="40" data-expected-height="100"></div> |
+ <div class="b" data-offset-x="40" data-offset-y="220" data-expected-width="120" data-expected-height="20"></div> |
+ <div class="c" data-offset-x="40" data-offset-y="60" data-expected-width="40" data-expected-height="20"></div> |
+ <div class="d" data-offset-x="40" data-offset-y="140" data-expected-width="40" data-expected-height="20"></div> |
+ </div> |
+</div> |
+ |
+<div style="position: relative"> |
+ <p>direction: LTR | distribution: 'stretch'</p> |
+ <div class="grid stretchedGrid stretch verticalRL" data-expected-width="200" data-expected-height="300"> |
+ <div class="a" data-offset-x="100" data-offset-y="0" data-expected-width="100" data-expected-height="200"></div> |
+ <div class="b" data-offset-x="0" data-offset-y="200" data-expected-width="200" data-expected-height="100"></div> |
+ <div class="c" data-offset-x="0" data-offset-y="0" data-expected-width="100" data-expected-height="100"></div> |
+ <div class="d" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div> |
+ </div> |
+</div> |
+ |
+<!-- RTL direction. --> |
+<div style="position: relative"> |
+ <p>direction: RTL | distribution: 'space-between'</p> |
+ <div class="grid spaceBetween verticalRL directionRTL" data-expected-width="200" data-expected-height="300"> |
+ <div class="a" data-offset-x="160" data-offset-y="140" data-expected-width="40" data-expected-height="160"></div> |
+ <div class="b" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="20"></div> |
+ <div class="c" data-offset-x="0" data-offset-y="280" data-expected-width="40" data-expected-height="20"></div> |
+ <div class="d" data-offset-x="0" data-offset-y="140" data-expected-width="40" data-expected-height="20"></div> |
+ </div> |
+</div> |
+ |
+<div style="position: relative"> |
+ <p>direction: RTL | distribution: 'space-around'</p> |
+ <div class="grid spaceAround verticalRL directionRTL" data-expected-width="200" data-expected-height="300"> |
+ <div class="a" data-offset-x="130" data-offset-y="140" data-expected-width="40" data-expected-height="120"></div> |
+ <div class="b" data-offset-x="30" data-offset-y="40" data-expected-width="140" data-expected-height="20"></div> |
+ <div class="c" data-offset-x="30" data-offset-y="240" data-expected-width="40" data-expected-height="20"></div> |
+ <div class="d" data-offset-x="30" data-offset-y="140" data-expected-width="40" data-expected-height="20"></div> |
+ </div> |
+</div> |
+ |
+<div style="position: relative"> |
+ <p>direction: RTL | distribution: 'space-evenly'</p> |
+ <div class="grid spaceEvenly verticalRL directionRTL" data-expected-width="200" data-expected-height="300"> |
+ <div class="a" data-offset-x="120" data-offset-y="140" data-expected-width="40" data-expected-height="100"></div> |
+ <div class="b" data-offset-x="40" data-offset-y="60" data-expected-width="120" data-expected-height="20"></div> |
+ <div class="c" data-offset-x="40" data-offset-y="220" data-expected-width="40" data-expected-height="20"></div> |
+ <div class="d" data-offset-x="40" data-offset-y="140" data-expected-width="40" data-expected-height="20"></div> |
+ </div> |
+</div> |
+ |
+<div style="position: relative"> |
+ <p>direction: RTL | distribution: 'stretch'</p> |
+ <div class="grid stretchedGrid stretch verticalRL directionRTL" data-expected-width="200" data-expected-height="300"> |
+ <div class="a" data-offset-x="100" data-offset-y="100" data-expected-width="100" data-expected-height="200"></div> |
+ <div class="b" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="100"></div> |
+ <div class="c" data-offset-x="0" data-offset-y="200" data-expected-width="100" data-expected-height="100"></div> |
+ <div class="d" data-offset-x="0" data-offset-y="100" data-expected-width="100" data-expected-height="100"></div> |
+ </div> |
+</div> |
+ |
+</body> |
+</html> |