wpt / css / css-overflow / line-clamp / webkit-line-clamp-with-max-height.html

Status: FAIL | Duration: 10ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-overflow/line-clamp/webkit-line-clamp-with-max-height.html

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: -webkit-line-clamp with max-height</title>
<link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp">
<link rel="match" href="reference/line-clamp-011-ref.html">
<meta name="assert" content="If the -webkit-line-clamp property is set on an element where max-height is also specified, they will interact the same as for line-clamp: that is, the container will clamp after the line given by -webkit-line-clamp, and if the block is too small, excess content overflows.">
<style>
.clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  font: 16px / 32px serif;
  white-space: pre;
  padding: 0 4px;
  background-color: yellow;
  max-height: 3lh;
}
.hidden {
  /* can be removed once implementations update their old -webkit-line-clamp implementations */
  visibility: hidden;
}
</style>

<div class="clamp">Line 1
Line 2
Line 3
Line 4
<div class="hidden">Line 5
Line 6
Line 7</div></div>

/css/css-overflow/line-clamp/reference/line-clamp-011-ref.html

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference</title>
<style>
div {
  font: 16px / 32px serif;
  white-space: pre;
  padding: 0 4px;
}
.clamp {
  height: 3lh;
  background-color: yellow;
}
</style>
<div class="clamp">Line 1
Line 2
Line 3</div>
<div>Line 4…</div>