author Emilio Cobos Álvarez <emilio@crisal.io>
Mon, 13 May 2019 09:14:33 +0000
changeset 532402 430b79a1444fd6935ea68abfbdb7a53d8e572b78
permissions -rw-r--r--
Bug 1551065 - Properly discard empty lines for -webkit-line-clamp. r=heycam That being said, this code is clearly not getting hit, are we 100% sure that this is interoperable with what WebKit / Blink do? Differential Revision: https://phabricator.services.mozilla.com/D30830

<!doctype html>
<meta charset="utf-8">
<title>CSS Overflow: -webkit-line-clamp with an empty line</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#webkit-line-clamp">
<link rel="match" href="about:blank">
.clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font: 16px / 32px serif;
  white-space: pre;
  background-color: yellow;
  padding: 0 4px;
  overflow: hidden; /* can be removed once implementations update their old -webkit-line-clamp implementations */
<div class="clamp"><div><span></span></div></div>