gecko-dev/testing/web-platform/tests/css/CSS2/linebox/baseline-block-with-overflow-001.html
Koji Ishii 861070530e Bug 1566170 [wpt PR 17841] - [LayoutNG] Make Block and inline-block have the same baseline when overflow: hidden, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Make Block and inline-block have the same baseline when `overflow: hidden`

CSS2 defines[1] the baseline of an 'inline-block' is the
bottom margin edge if its `overflow` property is other than
`visible`.

Legacy, Gecko, and WebKit apply this rule to `block` too.
This patch matches to these engines.

Edge fails these tests, but MSN serves different page for
Edge (no gear icon) and that this problem does not appear.

[1] https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align

Bug: 983822
Change-Id: I2c6c9ea7cb629a61720c9aeec9979341ce86360e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1701618
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677461}

--

wpt-commits: b91110463d121e6b4ba6749df1fe5f54e9540d92
wpt-pr: 17841
2019-07-24 13:34:34 +01:00

67 lines
1.2 KiB
HTML

<!DOCTYPE html>
<title>CSS Test: Baseline of blocks with `overflow: hidden`</title>
<link rel="match" href="baseline-block-with-overflow-001-ref.html">
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align">
<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
<style>
section {
margin-bottom: 1px;
}
.outer {
display: inline-block;
background: orange;
padding-bottom: 20px;
}
.inner {
width: 30px;
height: 30px;
overflow: hidden;
background: blue;
}
.inline-block {
display: inline-block;
}
.margin-bottom {
margin-bottom: 30px;
}
</style>
<body>
<section>
<div class="outer">
<div class="inner inline-block">
</div>
</div>
XX
</section>
<section>
<div class="outer">
<div class="inner">
</div>
</div>
XX
</section>
<section>
<div class="outer">
<div class="inner">
XX
</div>
</div>
XX
</section>
<section>
<div class="outer">
<div class="inner margin-bottom inline-block">
XX
</div>
</div>
XX
</section>
<section class="margin-bottom">
<div class="outer">
<div class="inner margin-bottom">
XX
</div>
</div>
XX
</section>
</body>