OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <link href="resources/grid.css" rel="stylesheet"> | 4 <link href="resources/grid.css" rel="stylesheet"> |
5 <style> | 5 <style> |
6 .grid { | 6 .grid { |
7 /* Give an explicit size to the grid so that percentage grid tracks have a c
onsistent resolution */ | 7 /* Give an explicit size to the grid so that percentage grid tracks have a c
onsistent resolution */ |
8 width: 800px; | 8 width: 800px; |
9 height: 600px; | 9 height: 600px; |
10 } | 10 } |
11 .gridItem { | 11 .gridItem { |
12 grid-column: 1; | 12 grid-column: 1; |
13 grid-row: 1; | 13 grid-row: 1; |
14 width: 7px; | 14 width: 7px; |
15 height: 11px; | 15 height: 11px; |
16 } | 16 } |
17 .gridItem2 { | 17 .gridItem2 { |
18 grid-column: 1; | 18 grid-column: 1; |
19 grid-row: 1; | 19 grid-row: 1; |
20 width: 17px; | 20 width: 17px; |
21 height: 3px; | 21 height: 3px; |
22 } | 22 } |
23 .gridWithNone { | 23 .gridWithNone { |
24 grid-template-columns: none; | 24 grid-template: none / none; |
25 grid-template-rows: none; | |
26 } | 25 } |
27 .gridWithFixed { | 26 .gridWithFixed { |
28 grid-template-columns: 10px; | 27 grid-template: 10px / 15px; |
29 grid-template-rows: 15px; | |
30 } | 28 } |
31 .gridWithPercent { | 29 .gridWithPercent { |
32 grid-template-columns: 50%; | 30 grid-template: 50% / 25%; |
33 grid-template-rows: 25%; | |
34 } | 31 } |
35 .gridWithAuto { | 32 .gridWithAuto { |
36 grid-template-columns: auto; | 33 grid-template: auto / auto; |
37 grid-template-rows: auto; | |
38 } | 34 } |
39 .gridWithEM { | 35 .gridWithEM { |
40 grid-template-columns: 10em; | 36 grid-template: 10em / 15em; |
41 grid-template-rows: 15em; | |
42 font: 10px Ahem; | 37 font: 10px Ahem; |
43 } | 38 } |
44 .gridWithViewPortPercentage { | 39 .gridWithViewPortPercentage { |
45 grid-template-columns: 8vw; | 40 grid-template: 8vw / 10vh; |
46 grid-template-rows: 10vh; | |
47 } | 41 } |
48 .gridWithFitContent { | 42 .gridWithFitContent { |
49 grid-template-columns: -webkit-fit-content; | 43 grid-template: -webkit-fit-content / -webkit-fit-content; |
50 grid-template-rows: -webkit-fit-content; | |
51 } | 44 } |
52 .gridWithFitAvailable { | 45 .gridWithFitAvailable { |
53 grid-template-columns: -webkit-fit-available; | 46 grid-template: -webkit-fit-available / -webkit-fit-available; |
54 grid-template-rows: -webkit-fit-available; | |
55 } | 47 } |
56 .gridWithMinMax { | 48 .gridWithMinMax { |
57 grid-template-columns: minmax(10%, 15px); | 49 grid-template: minmax(10%, 15px) / minmax(20px, 50%); |
58 grid-template-rows: minmax(20px, 50%); | |
59 } | 50 } |
60 .gridWithMinContent { | 51 .gridWithMinContent { |
61 grid-template-columns: min-content; | 52 grid-template: min-content / min-content; |
62 grid-template-rows: min-content; | |
63 } | 53 } |
64 .gridWithMaxContent { | 54 .gridWithMaxContent { |
65 grid-template-columns: max-content; | 55 grid-template: max-content / max-content; |
66 grid-template-rows: max-content; | |
67 } | 56 } |
68 .gridWithFraction { | 57 .gridWithFraction { |
69 grid-template-columns: 1fr; | 58 grid-template: 1fr / 2fr; |
70 grid-template-rows: 2fr; | |
71 } | 59 } |
72 .gridWithCalc { | 60 .gridWithCalc { |
73 grid-template-columns: calc(150px); | 61 grid-template: calc(150px) / calc(75px); |
74 grid-template-rows: calc(75px); | |
75 } | 62 } |
76 .gridWithCalcComplex { | 63 .gridWithCalcComplex { |
77 grid-template-columns: calc(50% + 150px); | 64 grid-template: calc(50% + 150px) / calc(65% + 75px); |
78 grid-template-rows: calc(65% + 75px); | |
79 } | 65 } |
80 .gridWithCalcInsideMinMax { | 66 .gridWithCalcInsideMinMax { |
81 grid-template-columns: minmax(10%, calc(15px)); | 67 grid-template: minmax(10%, calc(15px)) / minmax(calc(20px), 50%); |
82 grid-template-rows: minmax(calc(20px), 50%); | |
83 } | 68 } |
84 .gridWithCalcComplexInsideMinMax { | 69 .gridWithCalcComplexInsideMinMax { |
85 grid-template-columns: minmax(10%, calc(50% + 15px)); | 70 grid-template: minmax(10%, calc(50% + 15px)) / minmax(calc(20px + 10%), 50%)
; |
86 grid-template-rows: minmax(calc(20px + 10%), 50%); | |
87 } | 71 } |
88 </style> | 72 </style> |
89 <script src="../../resources/js-test.js"></script> | 73 <script src="../../resources/js-test.js"></script> |
90 </head> | 74 </head> |
91 <body> | 75 <body> |
92 <div class="grid gridWithNone" id="gridWithNoneElement"></div> | 76 <div class="grid gridWithNone" id="gridWithNoneElement"></div> |
93 <div class="grid gridWithFixed" id="gridWithFixedElement"></div> | 77 <div class="grid gridWithFixed" id="gridWithFixedElement"></div> |
94 <div class="grid gridWithPercent" id="gridWithPercentElement"></div> | 78 <div class="grid gridWithPercent" id="gridWithPercentElement"></div> |
95 <div class="indefiniteSizeGrid gridWithPercent" id="gridWithPercentWithoutSize">
</div> | 79 <div class="indefiniteSizeGrid gridWithPercent" id="gridWithPercentWithoutSize">
</div> |
96 <div class="indefiniteSizeGrid gridWithPercent" id="gridWithPercentWithoutSizeWi
thChildren"> | 80 <div class="indefiniteSizeGrid gridWithPercent" id="gridWithPercentWithoutSizeWi
thChildren"> |
(...skipping 17 matching lines...) Expand all Loading... |
114 <div class="grid gridWithMaxContent" id="gridWithMaxContentElement"></div> | 98 <div class="grid gridWithMaxContent" id="gridWithMaxContentElement"></div> |
115 <div class="grid gridWithMaxContent" id="gridWithMaxContentWithChildrenElement"> | 99 <div class="grid gridWithMaxContent" id="gridWithMaxContentWithChildrenElement"> |
116 <div class="gridItem"></div> | 100 <div class="gridItem"></div> |
117 <div class="gridItem2"></div> | 101 <div class="gridItem2"></div> |
118 </div> | 102 </div> |
119 <div class="grid gridWithFraction" id="gridWithFractionElement"></div> | 103 <div class="grid gridWithFraction" id="gridWithFractionElement"></div> |
120 <div class="grid gridWithCalc" id="gridWithCalcElement"></div> | 104 <div class="grid gridWithCalc" id="gridWithCalcElement"></div> |
121 <div class="grid gridWithCalcComplex" id="gridWithCalcComplexElement"></div> | 105 <div class="grid gridWithCalcComplex" id="gridWithCalcComplexElement"></div> |
122 <div class="grid gridWithCalcInsideMinMax" id="gridWithCalcInsideMinMaxElement">
</div> | 106 <div class="grid gridWithCalcInsideMinMax" id="gridWithCalcInsideMinMaxElement">
</div> |
123 <div class="grid gridWithCalcComplexInsideMinMax" id="gridWithCalcComplexInsideM
inMaxElement"></div> | 107 <div class="grid gridWithCalcComplexInsideMinMax" id="gridWithCalcComplexInsideM
inMaxElement"></div> |
124 <script src="resources/grid-definitions-parsing-utils.js"></script> | 108 <script src="resources/grid-template-shorthand-parsing-utils.js"></script> |
125 <script src="resources/grid-columns-rows-get-set.js"></script> | 109 <script src="resources/grid-template-shorthand-columns-rows-get-set.js"></script
> |
126 </body> | 110 </body> |
127 </html> | 111 </html> |
OLD | NEW |