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/line-break/line-break-var-substitution.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Text: Setting line-break:anywhere with variable substitution</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#target {
--lb: anywhere;
line-break: var(--lb);
}
</style>
<div id="target"></div>
<script>
test(() => {
assert_equals(getComputedStyle(target).lineBreak, "anywhere");
}, "Test that line-break can be set with a var() substitution");
</script>