Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-transitions/parsing/transition-property-invalid.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Transitions: parsing transition-property with invalid values</title>
<meta name="assert" content="transition-property supports only the grammar 'none | <single-transition-property>#'.">
<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("transition-property", 'one two three');
test_invalid_value("transition-property", '1, 2, 3');
test_invalid_value("transition-property", 'none, one');
let excludedKeywords = [
// CSS-wide keywords are excluded from <custom-ident>
"initial",
"inherit",
"unset",
"revert",
"revert-layer",
"default",
// `transition-property` additionally excludes the following
// from <custom-ident>:
"none",
];
for (let keyword of excludedKeywords) {
test_invalid_value("transition-property", `top, ${keyword}`);
test_invalid_value("transition-property", `${keyword}, top`);
for (let k of excludedKeywords) {
test_invalid_value("transition-property", `${keyword}, ${k}`);
}
}
</script>
</body>
</html>