4 <link href=
"resources/grid.css" rel=
"stylesheet">
7 grid-template-rows: [before]
50px [middle]
100px [after]
150px;
8 grid-template-columns:
40px
80px
160px;
12 grid-template-areas:
"first second third"
17 grid-template-areas:
"first second third"
18 "fourth fourth third";
45 .gridItemSpan2ThirdArea {
47 grid-column: span
2 / third;
50 .gridItemNamedGridLineWithArea {
51 grid-row: third / after;
55 <script src=
"../../resources/check-layout.js"></script>
57 <body onload=
"checkLayout('.grid')">
59 <p>This test checks that we resolve named grid areas per the specification.
</p>
61 <div style=
"position: relative">
62 <div class=
"grid gridWithoutRepeat">
63 <div class=
"sizedToGridArea gridItemSixthArea" data-offset-x=
"120" data-offset-y=
"50" data-expected-width=
"160" data-expected-height=
"100"></div>
64 <div class=
"sizedToGridArea gridItemFifthArea" data-offset-x=
"40" data-offset-y=
"50" data-expected-width=
"80" data-expected-height=
"100"></div>
65 <div class=
"sizedToGridArea gridItemFourthArea" data-offset-x=
"0" data-offset-y=
"50" data-expected-width=
"40" data-expected-height=
"100"></div>
66 <div class=
"sizedToGridArea gridItemThirdArea" data-offset-x=
"120" data-offset-y=
"0" data-expected-width=
"160" data-expected-height=
"50"></div>
67 <div class=
"sizedToGridArea gridItemSecondArea" data-offset-x=
"40" data-offset-y=
"0" data-expected-width=
"80" data-expected-height=
"50"></div>
68 <div class=
"sizedToGridArea gridItemFirstArea" data-offset-x=
"0" data-offset-y=
"0" data-expected-width=
"40" data-expected-height=
"50"></div>
70 <div class=
"sizedToGridArea gridItemSpan2ThirdArea" data-offset-x=
"40" data-offset-y=
"50" data-expected-width=
"240" data-expected-height=
"100"></div>
71 <div class=
"sizedToGridArea gridItemNamedGridLineWithArea" data-offset-x=
"0" data-offset-y=
"0" data-expected-width=
"40" data-expected-height=
"150"></div>
75 <div style=
"position: relative">
76 <div class=
"grid gridWithRepeat">
77 <!-- fifth and sixth are invalid named grid areas. -->
78 <div class=
"sizedToGridArea gridItemSixthArea" data-offset-x=
"0" data-offset-y=
"150" data-expected-width=
"40" data-expected-height=
"150"></div>
79 <div class=
"sizedToGridArea gridItemFifthArea" data-offset-x=
"40" data-offset-y=
"150" data-expected-width=
"80" data-expected-height=
"150"></div>
81 <div class=
"sizedToGridArea gridItemFourthArea" data-offset-x=
"0" data-offset-y=
"50" data-expected-width=
"120" data-expected-height=
"100"></div>
82 <div class=
"sizedToGridArea gridItemThirdArea" data-offset-x=
"120" data-offset-y=
"0" data-expected-width=
"160" data-expected-height=
"150"></div>
83 <div class=
"sizedToGridArea gridItemSecondArea" data-offset-x=
"40" data-offset-y=
"0" data-expected-width=
"80" data-expected-height=
"50"></div>
84 <div class=
"sizedToGridArea gridItemFirstArea" data-offset-x=
"0" data-offset-y=
"0" data-expected-width=
"40" data-expected-height=
"50"></div>
86 <div class=
"sizedToGridArea gridItemSpan2ThirdArea" data-offset-x=
"40" data-offset-y=
"50" data-expected-width=
"240" data-expected-height=
"100"></div>
87 <div class=
"sizedToGridArea gridItemNamedGridLineWithArea" data-offset-x=
"0" data-offset-y=
"0" data-expected-width=
"40" data-expected-height=
"150"></div>