-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Incorrect section number for h3 or lower #138
Comments
調べました。CSS変数を評価したあとのスタイルシートの関連部分は次のようになってました: body {
counter-reset: vs-counter-sec-h2 vs-counter-sec-h3 vs-counter-sec-h4;
}
section:has(> h1:first-child) {
counter-increment: vs-counter-sec-h1;
}
section:has(> h2:first-child) {
counter-increment: vs-counter-sec-h2;
}
section > h2:first-child::before {
content: counter(vs-counter-sec-h2);
}
section:has(> h3:first-child) {
counter-increment: vs-counter-sec-h3;
}
section > h3:first-child::before {
content: counter(vs-counter-sec-h2) "." counter(vs-counter-sec-h3);
}
section:has(> h4:first-child) {
counter-increment: vs-counter-sec-h4;
}
section > h4:first-child::before {
content: counter(vs-counter-sec-h2) "." counter(vs-counter-sec-h3) "." counter(vs-counter-sec-h4);
} 問題はカウンタ <body>
…
<h2>H2タイトル</h2>
<section>
<h3>H3タイトル</h3>
<section>
<h4>H4タイトル</h4>
</section>
</section>
<section>
<h3>H3タイトル</h3>
<section>
<h4>H4タイトル</h4>
</section>
</section> #133 で追加された次の部分 themes/packages/@vivliostyle/theme-base/css/partial/section.css Lines 22 to 29 in 8654d98
がなかったときは問題が起きなかった理由は、カウンタ 修正案: --vs-section--root-counter-reset: vs-counter-sections
var(--vs-section--root-counter-sections,) vs-counter-sec-h1
var(--vs-section--root-counter-sec-h1,); |
From https://vivliostyle.slack.com/archives/CJAP6GBKQ/p1736246169734479
The text was updated successfully, but these errors were encountered: