Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Layout Test: parsing grid-template-columns with invalid values</title>
<meta name="assert" content="grid-template-columns supports only the grammar 'none | <track-list> | <auto-track-list>'.">
<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("grid-template-columns", '-10px');
test_invalid_value("grid-template-columns", '-20%');
test_invalid_value("grid-template-columns", '-5fr');
test_invalid_value("grid-template-columns", 'minmax(5fr, calc(0.5em + 10px))');
test_invalid_value("grid-template-columns", 'minmax(-10px, auto)');
test_invalid_value("grid-template-columns", 'minmax(-20%, max-content)');
test_invalid_value("grid-template-columns", 'minmax(min-content, -20%)');
test_invalid_value("grid-template-columns", 'fit-content(-10px)');
test_invalid_value("grid-template-columns", 'fit-content(-20%)');
test_invalid_value("grid-template-columns", '[one] 10px [two three] repeat(20%) [four five six] 3fr [seven]');
test_invalid_value("grid-template-columns", '[one]');
test_invalid_value("grid-template-columns", '[one] 10px [two] [three]');
test_invalid_value("grid-template-columns", 'repeat(auto-fill, -10px)');
test_invalid_value("grid-template-columns", 'repeat(auto-fill, 10px) repeat(auto-fit, 20%)');
test_invalid_value("grid-template-columns", '[auto] 1px');
</script>
</body>
</html>