Re: [csswg-drafts] Reconsider <An+B># for :heading (#12599)

> Apart from odd and even, it's much easier to list the numbers than to compose an An+B pattern.

Yeah, that's why I'm saying switching to `<int>#` is more useful than a single `<an+b>` - the use-cases for an+b, for headings, are pretty minimal. You need the B part, obviously, to select a single heading, and it's reasonable to want a range of headings (which you can kinda do with an+b, at least selecting *all* the headings above or below a certain spot). But none of the other functionality is really worth anything; `even`/`odd` or the more complex skipping is just not useful here, *particularly* since the set of possible heading levels is small and fixed so you can just write them out explicitly if needed.

The reason I originally leaned toward `<an+b>#` is just because "why not?", really. If you're numerically indexing, we have An+B for that, and the common case wants comma-separated ints, so might as well do comma-separated An+B. But there's no good reason to be wedded to that, I think.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12599#issuecomment-3192808694 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 15 August 2025 21:29:11 UTC