fune/testing/web-platform/tests/css/css-flexbox/select-element-zero-height-001.html
Sergio f1433da86f Bug 1697552 [wpt PR 27975] - [css-flexbox] Improve robustness of select-element-zero-height-* tests, a=testonly
Automatic update from web-platform-tests
Fix (#27975)

WebKit has been applying (since 2003) what it calls intrinsic margins to control elements (like menu lists) for several reasons, mainly to leave space for focus rings and to keep them from butting up against one another. Those intrinsic margins are applied only if the control element (like <select>) has auto or intrinsic size.

This is a problem in select-element-zero-height-* tests in which the control has auto size in the gold standard and a specified size (100%) in the reference. From the WebKit POV the former needs "intrinsic margins" while the latter don't, creating 2px differences in the results that has nothing to do with flexbox.
--

wpt-commits: 50617ffae5019a6f05448f12446ee2c2c48a4112
wpt-pr: 27975
2021-03-19 10:34:46 +00:00

26 lines
800 B
HTML

<!DOCTYPE html>
<title>Select element in flexbox with zero height</title>
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1591925">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#content-size-suggestion">
<link rel="match" href="select-element-zero-height-001-ref.html">
<style>
.container {
display: flex;
flex-direction: column;
height: 0px;
border: 1px dotted black;
}
select {
/*
WebKit applies intrinsic (default) margins to control elements in some circumstances,
let's disable them to avoid mismatch errors caused by those margins.
*/
margin: 0;
}
</style>
<body>
<div class="container">
<select><option>Hi</option></select>
</div>
</body>