Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

writing-mode specified on the body element should not be inherited by the page context #1122

Open
MurakamiShinyu opened this issue Feb 3, 2023 · 0 comments

Comments

@MurakamiShinyu
Copy link
Member

The writing-mode specified on the body element should not be inherited by the page context.

See the spec: https://www.w3.org/TR/css-writing-modes-3/#principal-flow

Test case:

<!doctype html>
<html lang="ja">
  <head>
    <style>
      @page {
        @top-center {
          content: "ここは横書きのはず";
        }
      }
      body {
        writing-mode: vertical-rl;
      }
    </style>
  </head>
  <body>
    <h1>ここは縦書き</h1>
    <p>body要素に指定されたwriting-modeプロパティはルート要素に指定された場合と異なり、ページコンテキスト(@pageルール内)に継承されるべきではない。</p>
  </body>
</html>

GitHub Gist: https://gist.github.com/MurakamiShinyu/000f3e5b0900b480e7aecd0cdfa82879

Test with Vivliostyle Viewer:
https://vivliostyle.vercel.app/#src=https://gist.github.com/MurakamiShinyu/000f3e5b0900b480e7aecd0cdfa82879

Result screenshot:
Screenshot 2023-02-03 at 15 00 38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant