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

css specified value "sectionlevel" #6260

Closed
carnoxen opened this issue Dec 30, 2020 · 0 comments
Closed

css specified value "sectionlevel" #6260

carnoxen opened this issue Dec 30, 2020 · 0 comments

Comments

@carnoxen
Copy link

carnoxen commented Dec 30, 2020

It is its level number in section. For example,

<main>
<h1 id="first">this is top</h1>
<section>
<h1 id="second">this is section</h1>
<section>
<h1 id="third">this is section</h1>
</section>
</section>
<main>

first, second, third-id element has level 1, 2, 3.

It can be useful for sizing heading fonts like this:

:heading {
    font-size: calc(2em * (sectionlevel - 1) * 75%);
}
@carnoxen carnoxen closed this as completed Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant