w3c / w3c/csswg-drafts

[css-overflow-5] Should nested scroll-marker generating elements result in nested ::scroll-marker pseudo-elements?

Open
#11,601 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

css-overflow-5
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodePen demo and the CSS Overflow 5 scroll-marker proposal. Compare the flat-marker and nested-marker outcomes, including the implications for dot-like presentations. Done means reaching a resolved behavior for nested scroll-marker-generating elements and recording that decision in the relevant specification text.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.