mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
74 lines
2.3 KiB
HTML
74 lines
2.3 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/
|
|
-->
|
|
<!--
|
|
This test checks that we correctly handle flex items with an explicit
|
|
"min-height: -moz-min-content".
|
|
|
|
We check that such flex items can't shrink below their min-content height,
|
|
unless we explicitly reduce their min-height with e.g. "min-height: 0".
|
|
-->
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<style>
|
|
div.flexbox {
|
|
height: 140px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
margin-right: 5px;
|
|
font-size: 8px;
|
|
border: 1px dotted black;
|
|
float: left;
|
|
}
|
|
div.flexbox > * {
|
|
margin-bottom: 20px;
|
|
border: 1px dashed green;
|
|
background: lightblue;
|
|
width: 40px;
|
|
min-height: -moz-min-content; /* not yet supported -- see bug 852367 */
|
|
}
|
|
div.smallSize { height: 5px; }
|
|
div.smallFlexBasis { flex-basis: 2px; }
|
|
div.zeroMinHeight { min-height: 0; }
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- Check that we honor "min-height: min-content" as a lower-bound when
|
|
sizing flex items. -->
|
|
<div class="flexbox">
|
|
<div>a b</div>
|
|
<div class="smallSize">a b</div>
|
|
<div class="smallFlexBasis">a b</div>
|
|
</div>
|
|
|
|
<!-- ... EVEN if our flex container is small and we're overflowing. -->
|
|
<div class="flexbox smallSize">
|
|
<div>a b</div>
|
|
<div class="smallSize">a b</div>
|
|
<div class="smallFlexBasis">a b</div>
|
|
</div>
|
|
|
|
<!-- Test that we don't clamp when we've got "min-height: 0" on our
|
|
flex items, though. -->
|
|
<div class="flexbox">
|
|
<div class="zeroMinHeight">a b</div>
|
|
<div class="zeroMinHeight smallSize">a b</div>
|
|
<div class="zeroMinHeight smallFlexBasis">a b</div>
|
|
</div>
|
|
|
|
<!-- ... and similarly, when we have a small flex container and we trigger
|
|
shrinking behavior, flex items with "min-height: 0" are allowed to
|
|
shrink past their min-content height. -->
|
|
<div class="flexbox smallSize">
|
|
<div class="zeroMinHeight">a b</div>
|
|
<div class="zeroMinHeight smallSize">a b</div>
|
|
<div class="zeroMinHeight smallFlexBasis">a b</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|