Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-text-decor/parsing/text-decoration-trim-valid.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Decoration Test: Parsing text-decoration-trim with valid values</title>
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
<meta name="assert" content="text-decoration-trim supports the full grammar '<length>{1,2} | auto'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<script>
test_valid_value("text-decoration-trim", "0px");
test_valid_value("text-decoration-trim", "0", "0px");
test_valid_value("text-decoration-trim", "0px 0px", "0px");
test_valid_value("text-decoration-trim", "0.5em");
test_valid_value("text-decoration-trim", "-1em");
test_valid_value("text-decoration-trim", "-1ch -1ch", "-1ch");
test_valid_value("text-decoration-trim", "1px 2px");
test_valid_value("text-decoration-trim", "1ch -1ch");
test_valid_value("text-decoration-trim", "calc(1em / 4) calc(-1ch)", "calc(0.25em) calc(-1ch)");
test_valid_value("text-decoration-trim", "auto");
</script>