Files
sousa-gecko/testing/web-platform/tests/css/css-overflow/parsing/max-lines-valid.html
T
Andreu Botella eb7f02dcb6 Bug 2038016 [wpt PR 59735] - [line-clamp] Add syntax for clamping by both lines and height, a=testonly
Automatic update from web-platform-tests
[line-clamp] Add syntax for clamping by both lines and height

Line-clamping by both a number of lines and a height, whichever is
smaller, is something that was implemented in
https://crrev.com/c/6757119. The syntax for that was the same as for
clamping by lines, gated on the presence of a height constraint such
as `max-height`. However, this turned out to not be web-compatible,
and it was put behind a runtime flag in https://crrev.com/c/7572510
while the CSSWG figured out a syntax for it.

In https://github.com/w3c/csswg-drafts/issues/13670, the CSSWG
resolved that the `max-lines` longhand would use both a number of
lines together with the `auto` keyword. This CL implements that.

Bug: 40336192
Change-Id: I5d639d36cc70f94148e33028b1faabb54cfd2393
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7798160
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Andreu Botella <abotella@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1632388}

--

wpt-commits: a24e24df0e7cc62ccc0abe2016b6f5c21dd72fb8
wpt-pr: 59735
2026-05-21 07:39:42 +00:00

22 lines
707 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Overflow: parsing max-lines with valid values</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#propdef-max-lines">
<meta name="assert" content="max-lines supports the full grammar 'none | <integer>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("max-lines", 'auto');
test_valid_value("max-lines", '1');
test_valid_value("max-lines", '6');
test_valid_value("max-lines", '7 auto');
test_valid_value("max-lines", 'auto 8', '8 auto');
</script>
</body>
</html>