- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 19 Jul 2023 18:17:20 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-lists-4][css-content-3] Add counter-style property to associate default counter style`, and agreed to the following: * `RESOLVED: add counter-style that associates default counter styles with each counter specified by counter-reset on the same element` * `RESOLVED: counter-style property takes a list of counter style keywords, which are matched up to counter-reset using coordinated list logic` * `RESOLVED: name tbd` * `RESOLVED: Work on counter shorthand` * `RESOLVED: All the counter things` <details><summary>The full IRC log of that discussion</summary> <emilio> fantasai: when you define a counter there's no association with counter style, just number+scope<br> <emilio> ... for anything other than decimal you need to explicitly set it every time you use counter() functions<br> <emilio> ... that's a minor difficulty and it gets even worse with target-counter()<br> <emilio> ... when you want to do multi-level lists you can't use different styles<br> <emilio> ... proposal is a counter-style list, much like counter-reset<br> <emilio> ... that associate counters with a default style<br> <Rossen_> q?<br> <emilio> ... I think it's a reasonable way of solving the issue<br> <emilio> q+<br> <bramus> emilio: would target counter take the counter from the elemen tyou are styling or the target element?<br> <bramus> fantasai: from the style associated with the counter<br> <Rossen_> q?<br> <emilio> fantasai: if you use implied counters but don't use counter-reset then you can't associate a style<br> <bramus> emilio: seems fine<br> <ntim> q+<br> <oriol> q+<br> <emilio> fantasai: it only works when you specify counter-reset<br> <emilio> ack emilio<br> <Rossen_> ack ntim<br> <emilio> ntim: how does this interact with the second argument to counter()?<br> <emilio> TabAtkins: that wins. Right now if you don't specify a second argument you get decimal, we'd change that<br> <Rossen_> ack oriol<br> <emilio> oriol: You mention this could be like counter-reset list, which doesn't use commas and has been a problem<br> <emilio> TabAtkins:<br> <emilio> TabAtkins: +1 for commas<br> <emilio> fantasai: I'd prefer to use commas<br> <emilio> ... if we used commas everywhere else<br> <emilio> ... so I'd be ok with adding a shorthand or something that uses commas<br> <emilio> ... but it'd be weird to make this the only counter prop that doesn't<br> <Rossen_> q?<br> <emilio> fantasai: proposal is add counter-style that associates default counter styles with each counter specified by counter-reset on the same element<br> <TabAtkins> i mean i guess we could define you could use, like, `[]` around your value to do more than the specified things<br> <TabAtkins> anyway this is on my time-travel list<br> <emilio> RESOLVED: add counter-style that associates default counter styles with each counter specified by counter-reset on the same element<br> <TabAtkins> 1) kill hitler, 2) introduce utf-8 five years earlier so ucs-2 never gets created, 3) put commas in the counter-* properties<br> <SebastianZ> +1 on that. ;)<br> <emilio> fantasai: follow-up question: there are two ways of binding styles with the names<br> <emilio> ... right now counter-reset gets name and value<br> <emilio> ... we should counter-style either just get the values and use the positional matching<br> <emilio> ... or follow the same syntax as counter-reset<br> <emilio> q+<br> <emilio> ... and specify the name<br> <bramus> emilio: i think i have slight preference to use the positional one, otherwise it would feel like ???. my understanding is that it wouldnt<br> <bramus> … feels more confusing with the ?? and is slightly more inefficient<br> <dbaron> s/???/it would work without using counter-reset/<br> <bramus> … but that last thing is a minor thing<br> <TabAtkins> i should come up with a `counter` shorthand<br> <oriol> q+<br> <emilio> ack emilio<br> <TabAtkins> but +1 to emilio, don't have a strong opinion and that sounds fine<br> <Rossen_> ack emilio<br> <Rossen_> ack oriol<br> <emilio> oriol: I think we have the typical problem of what happens when you specify a list that's longers<br> <emilio> fantasai: we do the same as for background and animations etc<br> <emilio> ... so if you use counter-style: alphabetic and two counter resets then both are alphabetic<br> <bramus> emilio: so the shorter this behavior i think at some opoint some browsers clmaped the bg list and that is not great. it computes as a specified and then uses ???.<br> <bramus> fantasai: we should use the same rules<br> <Rossen_> ack dbaron<br> <emilio> dbaron: I think I agree with the conclusion about using the styles without the names and the list matching<br> <emilio> ... the issue I find with that solution is the name of the property<br> <emilio> ... counter-style doesn't feel like something that's talking about counters you are resetting<br> <emilio> fantasai: not concerned about it because we already have list-style and counter()<br> <oriol> q+<br> <emilio> dbaron: I think people are going to try using it on the element that's using the counter and get confused<br> <Rossen_> ack oriol<br> <emilio> oriol: Why are we tying this to counter-reset? Could we provide a way of specifying the associations separately?<br> <emilio> fantasai: you need to do it when the counter is created and counter-reset is what does that<br> <ntim> q+<br> <emilio> ... so it has to be tracked with the property that instantiate the counter<br> <emilio> q+<br> <emilio> ... counter-increment/set create implicit resets<br> <emilio> oriol: couldn't you provide a way to change the style separately from the counter<br> <emilio> fantasai: maybe I don't think that's useful?<br> <emilio> ... then we'd need to define the scoping etc<br> <emilio> oriol: other properties are not tied to reset<br> <emilio> fantasai: right because they change the value of the counter<br> <Rossen_> ack ntim<br> <emilio> ntim: Can we make this new property inherited?<br> <emilio> fantasai: no<br> <emilio> ... that doesn't give you good result<br> <emilio> TabAtkins: won't pair well, it also prevents shorthandifying counter styles<br> <emilio> fantasai: inheriting would cause wrong results if you only specify counter-reset somewhere down the tree<br> <emilio> q+<br> <Rossen_> q?<br> <Rossen_> ack emilio<br> <bramus> emilio: my other q is can we extend the counter-reset synbtax to allow this?<br> <bramus> TabAtkins: no, unless we want it to take a function<br> <miriam> q+<br> <bramus> … which can be space separted. but bc lack of commas we cant<br> <ntim> q+<br> <bramus> emilio: counter-reset takes item number/<br> <bramus> TabAtkins: ident optional number<br> <bramus> emilio: I guess you could maybe put the style with brackets but that sucks?<br> <bramus> TabAtkins: that is essentially a function<br> <bramus> … we should define a counter shorthand<br> <bramus> … and it will have commas<br> <ntim> q-<br> <bramus> fantasai: yes<br> <bramus> TabAtkins: we screwed up the counter-* props initially. dont knwo why<br> <emilio> dbaron: I think counter props might be the first list valued prop<br> <emilio> fantasai: font-family!<br> <emilio> miriam: I'm not totally convinced by arguments against tim's proposal<br> <emilio> ... I might want to to set the counters for the whole site<br> <Rossen_> ack miriam<br> <ntim> q+<br> <emilio> fantasai: then set it on * but otherwise inheriting gives you weird behavior for all the decimal-based counters that already work<br> <Rossen_> ack ntim<br> <emilio> ntim: my rationale was more something like list-style where you put list-style on the list-container<br> <emilio> TabAtkins: that's fair but list props are all inherited<br> <emilio> ... we're keeping those as consistent as possible<br> <bramus> emilio: you usually counter rest on the list container. so that would still work<br> <emilio> s/rest/reset<br> <emilio> fantasai: proposed resolution is a counter-style prop that takes a list of names<br> <bramus> emilio: regarding the name; counter-reset-style maybe?<br> <emilio> TabAtkins: fine with something like that<br> <emilio> ntim: can we resolve on working on the shorthand?<br> <emilio> TabAtkins: I'd be happy to resolve on that<br> <fantasai> PROPOSED: counter-style property takes a list of counter style keywords, which are matched up to counter-reset using coordinated list logic<br> <emilio> proposed: Add a property (counter-style/counter-reset-style/exact name tbd) that takes a list of counter-style names and gets associated to counter-reset using the coordinated property list behavior<br> <fantasai> RESOLVED: counter-style property takes a list of counter style keywords, which are matched up to counter-reset using coordinated list logic<br> <TabAtkins> RESOLVED: name tbd<br> <emilio> RESOLVED: Work on counter shorthand<br> <astearns> RESOLVED: All the counter things<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8997#issuecomment-1642544260 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 19 July 2023 18:17:22 UTC