| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]"> |
| <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> |
| <link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes"> |
| <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1231059"> |
| <link rel="match" href="../reference/ref-filled-green-100px-square-only.html"> |
| <meta name="assert" content="This test verifies that the inner div's padding is resolved against the outer div's width when computing its min-content width."> |
| |
| <style> |
| .outer { |
| width: 25px; |
| height: 50px; |
| } |
| .inner { |
| display: inline-block; |
| box-sizing: border-box; |
| height: 100%; |
| padding-top: 100%; /* 25px */ |
| background: green; |
| } |
| canvas { |
| height: 100%; |
| } |
| </style> |
| |
| <p>Test passes if there is a filled green square.</p> |
| <div class="outer"> |
| <div class="inner"> |
| <!-- display:block on <canvas> exercises a different code path in Firefox. --> |
| <canvas width="40" height="10" style="display: block;"></canvas> |
| </div> |
| </div> |
| <div class="outer"> |
| <div class="inner"> |
| <canvas width="40" height="10"></canvas> |
| </div> |
| </div> |