Status: PASS | Duration: 10ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-writing-modes/wm-propagation-body-044.html
<!DOCTYPE html> <meta charset="UTF-8"> <title>CSS Writing Modes Test: 'writing-mode: horizontal-tb' set to <body> element propagates to viewport</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <link rel="help" href="https://www.w3.org/TR/css-writing-modes-3/#principal-flow" title="8. The Principal Writing Mode"> <!-- Issue 3066: [css-writing-modes] Does vertical writing mode of an HTML body element cause an orthogonal flow? https://github.com/w3c/csswg-drafts/issues/3066 --> <link rel="match" href="wm-propagation-body-044-ref.html"> <meta name="assert" content="This test checks that when the root element has a <body> child element, then the principal writing mode is instead taken from the values of writing-mode and direction on the first such child element instead of taken from the root element. We also check that the computed value is unaffected by inheriting it into a pseudo element."> <!-- Tests 032 to 035: html's writing-mode is not specified Tests 036 to 039: html's writing-mode is specified as horizontal-tb Tests 040 to 043: html's writing-mode is specified as vertical-rl Tests 044 to 047: html's writing-mode is specified as vertical-lr Tests 048 to 051: html's writing-mode is specified as sideways-rl Tests 052 to 055: html's writing-mode is specified as sideways-lr --> <style> html { writing-mode: vertical-lr; } html::after { content: "This text must be written vertically, below the orange square."; display: block; } body { writing-mode: horizontal-tb; } img#orange-square { height: 100px; padding-right: 1em; vertical-align: top; width: 100px; } </style> <body> <p><img id="orange-square" src="support/swatch-orange.png" alt="Image download support must be enabled"><img src="support/wm-propagation-body-003-exp-res.png" width="340" height="37" alt="Image download support must be enabled"></p> <!-- The image says: Test passes if there is an orange square in the <strong>upper-left corner</strong> of the page. -->
/css/css-writing-modes/wm-propagation-body-044-ref.html
<!DOCTYPE html> <meta charset="UTF-8"> <title>CSS Reftest Reference</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <style> body { margin-bottom: 0; } img#orange-square { padding-right: 16px; vertical-align: top; } div { margin-left: -8px; writing-mode: vertical-rl; } </style> <p><img id="orange-square" src="support/swatch-orange.png" width="100" height="100" alt="Image download support must be enabled"><img src="support/wm-propagation-body-003-exp-res.png" width="340" height="37" alt="Image download support must be enabled"> <!-- The image says: Test passes if there is an orange square in the <strong>upper-left corner</strong> of the page. --> <div>This text must be written vertically, below the orange square.</div>