diff options
author | Yuri Kobets <yuri.kobets@gmail.com> | 2024-01-31 03:48:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-31 03:48:44 +0300 |
commit | 6ca1ab0419e770e6d35a1ef690238773a1dafcee (patch) | |
tree | 16df635edd594dc1d1b9d0044993e2ae4d0e0200 /test/render/flex/--flexbox-sizing-vert-002.htm | |
parent | 8c320007878795fe629de7fe1eaef9328ac9c719 (diff) | |
parent | d85ebec101e77825e5708e58df0e2508ec4fd389 (diff) |
Flex layout
Diffstat (limited to 'test/render/flex/--flexbox-sizing-vert-002.htm')
-rw-r--r-- | test/render/flex/--flexbox-sizing-vert-002.htm | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/test/render/flex/--flexbox-sizing-vert-002.htm b/test/render/flex/--flexbox-sizing-vert-002.htm new file mode 100644 index 00000000..64a451a6 --- /dev/null +++ b/test/render/flex/--flexbox-sizing-vert-002.htm @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--><!-- + This testcase checks how "min-width" and "max-width" affect the sizing + of vertical flex containers that have no explicit "width" property. +--><html> + +<!-- Mirrored from test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/flexbox-sizing-vert-002.htm by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 23 Dec 2023 16:15:11 GMT --> +<head> + <title>CSS Test: Testing sizing of an auto-sized vertical flex container with min-width and max-width constraints</title> + <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> + <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#layout-algorithm"> + <link rel="match" href="http://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/reference/flexbox-sizing-vert-002-ref.htm"> + <style> + div { height: 100px; } + div.flexbox { + float: left; + border: 1px dashed blue; + background: lightgreen; + font-size: 10px; + display: flex; + margin-right: 10px; + } + </style> + </head> + <body> + <!-- floated auto-width vertical flexbox should shrinkwrap its contents. --> + <div class="flexbox"> + <div>AB</div> + </div> + + <!-- Adding a small min-size shouldn't affect that. --> + <div class="flexbox" style="min-width: 2px"> + <div>AB</div> + </div> + + <!-- ...nor should a large max-size. --> + <div class="flexbox" style="max-width: 300px"> + <div>AB</div> + </div> + + <!-- OK. Now, if we set a minimum size that's larger than the shrinkwrap + size, we should jump up to that size.--> + <div class="flexbox" style="min-width: 30px"> + <div>AB</div> + </div> + + <!-- If we set a maximum size that's smaller than the shrinkwrap size, + we should max out at that size.--> + <div class="flexbox" style="max-width: 3px"> + <div>AB</div> + </div> + + <!-- But if we add a min-size, it beats the max-size. --> + <div class="flexbox" style="min-width: 30px; max-width: 5px"> + <div>AB</div> + </div> + + </body> + +<!-- Mirrored from test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/html/flexbox-sizing-vert-002.htm by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 23 Dec 2023 16:15:11 GMT --> +</html>
\ No newline at end of file |