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

The CSS Working Group just discussed `Reconsider <An+B># for :heading`, and agreed to the following:

* `RESOLVED: change spec to list of integers`

<details><summary>The full IRC log of that discussion</summary>
&lt;ydaniv> TabAtkins: some context, what whatwg was doing regarding heading level<br>
&lt;ydaniv> ... this issue is about design of functional form of heading()<br>
&lt;ydaniv> ... per spec it takes a comma separated list of An+B<br>
&lt;ydaniv> ... Ana wanted to simplify this<br>
&lt;fantasai> s/Ana/Anne<br>
&lt;ydaniv> ... wanted An+B<br>
&lt;ydaniv> ... I pushed back and suggested to do comma separated integers<br>
&lt;ydaniv> ... some discussion back and forth<br>
&lt;ydaniv> ... Anne is pushing back on pseudo classes for some reason<br>
&lt;kbabbitt> q+<br>
&lt;ydaniv> ... my suggestion is to do comma separated integers<br>
&lt;fantasai> s/pseudo classes/comma-separated lists/<br>
&lt;astearns> ack lea<br>
&lt;astearns> ack kbabbitt<br>
&lt;ydaniv> kbabbitt: wanted more details on the discussion<br>
&lt;ydaniv> ... it allows now 6 levels in HTML<br>
&lt;ydaniv> ... is this allowing more levels? or disassocating from HTML?<br>
&lt;ydaniv> TabAtkins: both<br>
&lt;SebastianZ> q+<br>
&lt;ydaniv> ... use generic tag and have it not rely on tag name<br>
&lt;ydaniv> ... but also to allow more levels, arbitrary number of levels<br>
&lt;TabAtkins> s/arbitrary/not arbitrary/<br>
&lt;astearns> ack SebastianZ<br>
&lt;ydaniv> SebastianZ: should it be restricted to just 9? or more?<br>
&lt;ydaniv> TabAtkins: the pseudo class should allow you any number<br>
&lt;astearns> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to respond<br>
&lt;ydaniv> fantasai: we can allow any number<br>
&lt;florian> q+<br>
&lt;ydaniv> ... we aren't going to limit it<br>
&lt;astearns> ack florian<br>
&lt;ydaniv> ... syntax is optimized for it<br>
&lt;noamr> q+<br>
&lt;ydaniv> florian: I have a hard time for allowing these patterns<br>
&lt;SebastianZ> q+<br>
&lt;ydaniv> ... would rather have comma separated to be simpler<br>
&lt;astearns> ack noamr<br>
&lt;ydaniv> noamr: there is presedence for comma separated<br>
&lt;fantasai> s/presedence/precedence/<br>
&lt;ydaniv> ... when you have list items, you don't know how many are going to be, and relationship is linear<br>
&lt;oriol> q+<br>
&lt;astearns> ack SebastianZ<br>
&lt;ydaniv> SebastianZ: quick idea, maybe introduce keywords><br>
&lt;ydaniv> s/>/?/<br>
&lt;astearns> ack oriol<br>
&lt;fantasai> SebastianZ: e.g. "1 to 6"<br>
&lt;ydaniv> oriol: no strong opinion<br>
&lt;TabAtkins> If you want *all* headings, that's `:heading`. if you want several but not all, `:heading(1, 2, 3, 4, 5)` isn't bad to write<br>
&lt;ydaniv> ... however, if we go with list the stack should be using logical OR or AND<br>
&lt;fantasai> TabAtkins: Not possible to have something be both heading 1 and heading 2,<br>
&lt;fantasai> TabAtkins: so only one possible interpretation<br>
&lt;ydaniv> florian: I think we should go with list of integers, just to clarify<br>
&lt;lea> Q?<br>
&lt;ydaniv> SebastianZ: advocate for using just numbers, but allow patterns?<br>
&lt;ydaniv> florian: not object but seems unnecessary<br>
&lt;ydaniv> fantasai: Agree with florian, we shouldn't bother<br>
&lt;kbabbitt> +1 to florian<br>
&lt;ydaniv> +1 to florian<br>
&lt;TabAtkins> +1<br>
&lt;ydaniv> PROPOSED: use comma separated integers<br>
&lt;lea> Q+<br>
&lt;ydaniv> astearns: other comments?<br>
&lt;ydaniv> lea: the An+B case is one of the comlex cases, something that also come with nth-child case<br>
&lt;astearns> ack lea<br>
&lt;ydaniv> ... and authors have to write all sorts of weird things<br>
&lt;ydaniv> ... so instead of just commas is to allow ranges from a to b<br>
&lt;ydaniv> TabAtkins: argument against is because the set is finite then allow just specifying it<br>
&lt;ydaniv> lea: in this case yes, because it's finite<br>
&lt;ydaniv> ... in other cases ranges are more desirable<br>
&lt;ydaniv> ... then we can also fix it here and fix all<br>
&lt;florian> q+<br>
&lt;astearns> ack fantasai<br>
&lt;ydaniv> fantasai: don't disagree, but think this is not the place to fix it<br>
&lt;ydaniv> lea: it's already limited to integers<br>
&lt;SebastianZ> lea See https://github.com/w3c/csswg-drafts/issues/4140<br>
&lt;kizu> To crosslink stuff, SebastianZ's issue about ranges: https://github.com/w3c/csswg-drafts/issues/4140<br>
&lt;ydaniv> lea: I agree we should simplify, but think we also need ranges<br>
&lt;TabAtkins> fantasai: people don't do repeating patterns on hierarchical section levels<br>
&lt;ydaniv> astearns: we're not going to discuss ranges for this issue<br>
&lt;ydaniv> ... was brought up before, but not for this one<br>
&lt;ydaniv> florian: I think choice should be either list of integers, or straight to An+B as a list<br>
&lt;ydaniv> ... I think there's one impl. in ladybird?<br>
&lt;ydaniv> ... if we haven't specced or implemented anything then &lt;missed><br>
&lt;ydaniv> ... if it's done already then, I'm ok with list of integers<br>
&lt;emilio> q+<br>
&lt;florian> s/f we haven't specced or implemented anything then &lt;missed>/f we hdn't specced or implemented anything then I'd to list of integers<br>
&lt;ydaniv> astearns: we have 2 options? currently has a list of An+B, we can leave like that or change to list of integers<br>
&lt;astearns> ack florian<br>
&lt;astearns> ack emilio<br>
&lt;ydaniv> emilio:  we can change have way<br>
&lt;florian> s/if it's done already then, I'm ok with list of integers/given that it's already implemmented in a few places, I'm ok with list of An+Bs<br>
&lt;ydaniv> ... I don't think having a list of integers is the only thing we could do<br>
&lt;ydaniv> astearns: hearing slight preference to list of integers<br>
&lt;ydaniv> emilio: might save a couple of bytes<br>
&lt;ydaniv> SebastianZ: once we discuss the issue about ranges and come to a solution on that<br>
&lt;ydaniv> ... I would apply that to all the other places<br>
&lt;ydaniv> florian: but that remains open regardless<br>
&lt;ydaniv> ... we're still open to doing that<br>
&lt;astearns> 1) list of An+B     2) list of integers<br>
&lt;TabAtkins> 2<br>
&lt;ydaniv> astearns: let's draw a poll<br>
&lt;fantasai> 2, but also ok with 1<br>
&lt;kbabbitt> 2<br>
&lt;lea> 2<br>
&lt;andruud> 2<br>
&lt;astearns> no preference<br>
&lt;emilio> weak preference for 1, also fine with 1<br>
&lt;SebastianZ> No preference<br>
&lt;diekus> 2<br>
&lt;oriol> abstain<br>
&lt;emilio> with 2*<br>
&lt;alisonmaher> No preference<br>
&lt;kizu> 2<br>
&lt;ydaniv> 2<br>
&lt;florian> ok either way<br>
&lt;ydaniv> proposed resolution: change spec to list of integers<br>
&lt;ydaniv> astearns: objections?<br>
&lt;ydaniv> RESOLVED: change spec to list of integers<br>
</details>


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


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

Received on Thursday, 21 August 2025 09:10:05 UTC