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-overflow-5] Should nested scroll-marker generating elements result in nested ::scroll-marker pseudo-elements? #11601

Open
flackr opened this issue Jan 29, 2025 · 0 comments

Comments

@flackr
Copy link
Contributor

flackr commented Jan 29, 2025

Consider the following demo also prototyped at https://codepen.io/flackr/pen/JoPxZmV:

<style>
section::scroll-marker {
  content: attr(data-title);
}
</style>
<section data-title="About">
  <section data-title="Who">
  </section>
  <section data-title="What we do">
  </section>
</section>
  1. This could generate a flat list of markers:

    • About
    • Who
    • What we do
  2. Or, should the generated ::scroll-marker pseudo-element for About contain the markers established by descendant elements, e.g.

    • About
      • Who
      • What we do

I've written up an example of what this might look like for both table of contents like scenarios and dot-like scenarios. This does affect how you would have to handle dots to have them render nicely. E.g you'd probably need the dots containing other dots to render their dot as a ::before so that it doesn't wrap all of its descendants.

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

2 participants
@flackr and others