flexbox-overflow-padding-001.html (1459B)
1 <!DOCTYPE html> 2 <html> 3 <meta charset="utf-8"> 4 <title>CSS Flexible Box Layout Test: Test flex container's overflow rect</title> 5 <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> 6 <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> 7 <link rel="help" href="https://drafts.csswg.org/css-overflow-3/#scrollable"> 8 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 9 <meta name="assert" content="When computing flex container's overflow area, its padding rect is added to flex item's margin-box, not flex item's overflow rect. This test verifies that last part; making sure it's not mistakenly added to the flex container's overflow rect."> 10 11 <style> 12 .scroll { 13 overflow: auto; 14 width: 100px; 15 height: 100px; 16 background: red; 17 } 18 .flexContainer { 19 display: flex; 20 padding: 25px; 21 background: green; 22 } 23 .flexItem { 24 flex-shrink: 0; 25 width: 30px; 26 height: 30px; 27 margin: 10px; 28 } 29 .flexItemOverflow { 30 width: 65px; 31 height: 65px; 32 } 33 </style> 34 35 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 36 <div class="scroll"> 37 <div class="flexContainer"> 38 <div class="flexItem"> 39 <!-- The item's right and bottom overflow edges should exactly touch the 40 flex container's right bottom left padding edges. --> 41 <div class="flexItemOverflow"></div> 42 </div> 43 </div> 44 </div> 45 </html>