grid-lanes-justify-content-003.html (3389B)
1 <!DOCTYPE HTML> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html><head> 7 <meta charset="utf-8"> 8 <title>CSS Grid Test: Grid Lanes layout with `justify-content` in grid-lanes axis (horizontal writing mode)</title> 9 <meta name="assert" 10 content="Test passes if justify-content shifts content 11 in the grid-lanes axis of a grid-lanes grid container."> 12 <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com"> 13 <link rel="author" title="Kurt Catti-Schmidt" href="mailto:kschmi@microsoft.com"> 14 <link rel="help" href="https://drafts.csswg.org/css-grid-3/#alignment"> 15 <link rel="match" href="grid-lanes-justify-content-003-ref.html"> 16 <style> 17 html,body { 18 color:black; background-color:white; font:15px/1 monospace; padding:0; margin:0; 19 } 20 21 grid { 22 display: inline-grid-lanes; 23 grid-lanes-direction: row; 24 gap: 1px 2px; 25 grid-template-rows: repeat(4,20px); 26 background: content-box silver; 27 border: 1px solid; 28 padding: 2px; 29 width: 100px; 30 } 31 32 item { 33 background-color: #444; 34 color: #fff; 35 } 36 37 .tall { padding-left: 30px; } 38 39 .safe { 40 width: 10px; 41 margin-right: 50px; 42 } 43 </style> 44 </head> 45 <body> 46 47 <grid style="justify-content:start"> 48 <item class="tall">1</item> 49 <item>2</item> 50 <item>3</item> 51 <item>4</item> 52 <item>5</item> 53 <item>6</item> 54 </grid> 55 56 <grid style="justify-content:start"> 57 <item>1</item> 58 <item class="tall">2</item> 59 <item>3</item> 60 <item>4</item> 61 <item>5</item> 62 <item>6</item> 63 </grid> 64 65 <grid style="justify-content:safe start" class="safe"> 66 <item class="tall">1</item> 67 <item>2</item> 68 <item>3</item> 69 <item>4</item> 70 <item>5</item> 71 <item>6</item> 72 </grid> 73 74 <grid style="justify-content:end"> 75 <item class="tall">1</item> 76 <item>2</item> 77 <item>3</item> 78 <item>4</item> 79 <item>5</item> 80 <item>6</item> 81 </grid> 82 83 <grid style="justify-content:end"> 84 <item>1</item> 85 <item class="tall">2</item> 86 <item>3</item> 87 <item>4</item> 88 <item>5</item> 89 <item>6</item> 90 </grid> 91 92 <grid style="justify-content:safe end" class="safe"> 93 <item class="tall">1</item> 94 <item>2</item> 95 <item>3</item> 96 <item>4</item> 97 <item>5</item> 98 <item>6</item> 99 </grid> 100 101 <grid style="justify-content:center"> 102 <item class="tall">1</item> 103 <item>2</item> 104 <item>3</item> 105 <item>4</item> 106 <item>5</item> 107 <item>6</item> 108 </grid> 109 110 <grid style="justify-content:center"> 111 <item>1</item> 112 <item class="tall">2</item> 113 <item>3</item> 114 <item>4</item> 115 <item>5</item> 116 <item>6</item> 117 </grid> 118 119 <grid style="justify-content:safe center" class="safe"> 120 <item class="tall">1</item> 121 <item>2</item> 122 <item>3</item> 123 <item>4</item> 124 <item>5</item> 125 <item>6</item> 126 </grid> 127 128 <grid style="justify-content:stretch"> 129 <item class="tall">1</item> 130 <item>2</item> 131 <item>3</item> 132 <item>4</item> 133 <item>5</item> 134 <item>6</item> 135 </grid> 136 137 <grid style="justify-content:space-between"> 138 <item class="tall">1</item> 139 <item>2</item> 140 <item>3</item> 141 <item>4</item> 142 <item>5</item> 143 <item>6</item> 144 </grid> 145 146 <grid style="justify-content:space-around"> 147 <item class="tall">1</item> 148 <item>2</item> 149 <item>3</item> 150 <item>4</item> 151 <item>5</item> 152 <item>6</item> 153 </grid> 154 155 <grid style="justify-content:space-evenly"> 156 <item class="tall">1</item> 157 <item>2</item> 158 <item>3</item> 159 <item>4</item> 160 <item>5</item> 161 <item>6</item> 162 </grid>