wpt / css / css-overflow / parsing / max-lines-invalid.html

Status: PASS | Duration: 52ms | Subtests: 8/8 | Open test on wpt.live | wpt.fyi

Data from commit:
a50cb89 wpt: run reference-named files which are themselves tests (#836) (2026-09-03)

SubtestStatusMessage
e.style['max-lines'] = "none" should not set the property valuePASS
e.style['max-lines'] = "0" should not set the property valuePASS
e.style['max-lines'] = "-5" should not set the property valuePASS
e.style['max-lines'] = "none none" should not set the property valuePASS
e.style['max-lines'] = "auto auto" should not set the property valuePASS
e.style['max-lines'] = "1 none" should not set the property valuePASS
e.style['max-lines'] = "none 2" should not set the property valuePASS
e.style['max-lines'] = "3 4" should not set the property valuePASS

/css/css-overflow/parsing/max-lines-invalid.html

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Overflow: parsing max-lines with invalid values</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#propdef-max-lines">
<meta name="assert" content="max-lines supports only the grammar 'none | <integer>'.">
<meta name="assert" content="Zero or negative integers are invalid.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("max-lines", 'none');
test_invalid_value("max-lines", '0');
test_invalid_value("max-lines", '-5');

test_invalid_value("max-lines", 'none none');
test_invalid_value("max-lines", 'auto auto');
test_invalid_value("max-lines", '1 none');
test_invalid_value("max-lines", 'none 2');
test_invalid_value("max-lines", '3 4');
</script>
</body>
</html>