flexbox-overflow-padding-002.html (1501B)
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 writing-mode: vertical-rl; 21 direction: rtl; 22 padding: 25px; 23 background: green; 24 } 25 .flexItem { 26 flex-shrink: 0; 27 width: 30px; 28 height: 30px; 29 margin: 10px; 30 } 31 .flexItemOverflow { 32 width: 65px; 33 height: 65px; 34 } 35 </style> 36 37 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 38 <div class="scroll"> 39 <div class="flexContainer"> 40 <div class="flexItem"> 41 <!-- The item's top and left overflow edges should exactly touch the 42 flex container's top and left padding edges. --> 43 <div class="flexItemOverflow"></div> 44 </div> 45 </div> 46 </div> 47 </html>