124 lines
3.6 KiB
HTML
124 lines
3.6 KiB
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>CSS -webkit-box Test: Testing no automatic minimum size for flex items in a legacy column-oriented flex container</title>
|
|
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
|
|
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
|
|
<link rel="help" href="https://compat.spec.whatwg.org/#valdef-flex--webkit-box">
|
|
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#min-size-auto">
|
|
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1929178">
|
|
<link rel="stylesheet" href="/fonts/ahem.css">
|
|
<meta name="assert" content="This test verifies that a flex item in a legacy -webkit-box can be shrunk as if it has no automatic minimum size.">
|
|
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/resources/check-layout-th.js"></script>
|
|
|
|
<style>
|
|
.webkit-box {
|
|
display: -webkit-inline-box;
|
|
-webkit-box-orient: vertical;
|
|
width: 50px;
|
|
height: 50px;
|
|
border: 1px solid black;
|
|
margin-bottom: 5px;
|
|
}
|
|
.webkit-box > * {
|
|
/* Make the child block-level, to ensure that it's a flex item (otherwise it
|
|
* may get wrapped in an anonymous box which becomes the flex item). */
|
|
display: block;
|
|
/* Allow the child to shrink. */
|
|
-webkit-box-flex: 1;
|
|
|
|
writing-mode: vertical-rl;
|
|
font: 20px/1 Ahem;
|
|
background: lightblue;
|
|
|
|
/* Get rid of UA default styles. */
|
|
border: 0;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
</style>
|
|
|
|
<body onload="checkLayout('.webkit-box')">
|
|
<div class="webkit-box">
|
|
<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 30'></svg>"
|
|
data-expected-height="50">
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<img src="data:image/svg+xml,<svg width='100' height='300' xmlns='http://www.w3.org/2000/svg'></svg>"
|
|
data-expected-height="50">
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<svg width="100" height="300" data-expected-client-height="50"></svg>
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<input type="text" data-expected-height="50">
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<input type="range" data-expected-height="50">
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<input type="button" value="XXXXXXX" data-expected-height="50">
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<input type="submit" value="XXXXXXX" data-expected-height="50">
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<input type="reset" value="XXXXXXX" data-expected-height="50">
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<textarea data-expected-height="50">XXXXXXX</textarea>
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<select data-expected-height="50">
|
|
<option>XXXXXXX</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<!-- This is a special case: <fieldset> is not compressible
|
|
in blink, webkit, or gecko. -->
|
|
<fieldset data-expected-height="140">XXXXXXX</fieldset>
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<iframe data-expected-height="50"></iframe>
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<button data-expected-height="50">XXXXXXX</button>
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<canvas width="100" height="300" data-expected-height="50"></canvas>
|
|
</div>
|
|
|
|
<!-- We are not testing <video controls> and <audio controls>
|
|
because they work only horizontally. -->
|
|
|
|
<div class="webkit-box">
|
|
<progress data-expected-height="50"></progress>
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<meter data-expected-height="50"></meter>
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<details data-expected-height="50">XXXXXXX</details>
|
|
</div>
|
|
|
|
<div class="webkit-box">
|
|
<div style="height: 200px" data-expected-height="50">XXXXXXX</div>
|
|
</div>
|
|
</body>
|