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/text-align/text-align-match-parent-002.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text Test: text-align - computed value for match-parent on the root element</title>
<meta name="assert" content="'text-align: match-parent' on the root element with 'direction: rtl' should compute to 'start'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
html {
text-align: match-parent;
direction: rtl;
}
#log {
direction: ltr;
text-align: start;
}
</style>
<div id="log"></div>
<script>
test(() => {
assert_equals(getComputedStyle(document.documentElement).textAlign, 'start');
});
</script>