container-queries-ref.html (801B)
1 <!doctype html> 2 <title>Reference for container-queries.html</title> 3 <link rel="author" title="Chris Harelson" href="mailto:chrishtr@chromium.org"> 4 <link rel="help" href="https://drafts.csswg.org/css-viewport/"> 5 <style> 6 .container { 7 container-type: inline-size; 8 width: 100px; 9 height: 100px; 10 } 11 .child { 12 background-color: green; 13 height: 50px; 14 width: 50px; 15 } 16 </style> 17 <p>All boxes below should be green.</p> 18 <div class="container"> 19 <div class="child"></div> 20 </div> 21 <div class="container" style="zoom: 2"> 22 <div class="child"></div> 23 </div> 24 <div class="container" style="zoom: 2"> 25 <div class="nested" style="zoom: 2"> 26 <div class="child"></div> 27 </div> 28 </div> 29 <div class="outer" style="zoom: 2"> 30 <div class="container"> 31 <div class="child"></div> 32 </div> 33 </div>