- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 21 Jun 2023 16:59:12 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-counter-styles-3] Support automatically localized counters`. <details><summary>The full IRC log of that discussion</summary> <emilio> TabAtkins: r12a do you think that this is more of a topic to be discussed or something to be introduced?<br> <emilio> r12a: we could discuss the concept, my take was similar to the ready-made counter-styles<br> <emilio> ... I'd think it'd be something that authors would define rather than something built-in<br> <emilio> ... would you like to introduce this?<br> <r12a> https://github.com/w3c/csswg-drafts/issues/7959#issuecomment-1592610379<br> <emilio> TabAtkins: somebody filed it requesting that for a few different categories we have an automatically-internationalized version<br> <emilio> ... e.g., `digits` would be `decimal` for english, french, ... but map to something else for other languages<br> <emilio> ... same for letters which could map to hiragana in japanese<br> <emilio> ... before we accepted moving counter styles into the registry this was a lot harder to do<br> <emilio> ... r12a proposed a new at-rule mapping lang to digits<br> <florian> q+<br> <emilio> ... does this sound worth pursuing<br> <miriam> ack r12a<br> <Zakim> r12a, you wanted to react to r12a<br> <emilio> r12a: the registry doesn't really need to enter into it in the registry<br> <emilio> s/to it in the registry//<br> <emilio> ... needs to work with author styles<br> <emilio> ... just a clarification<br> <emilio> jensimmons: I really like this idea<br> <TabAtkins> My thought was just that, since we'd be supporting a ton of these, we'd also have a UA stylesheet registry with a bunch assigned. Authors would still be able to extend/override it.<br> <emilio> ... so many languages have translations<br> <TabAtkins> q+<br> <emilio> ... so even if they are not published in different languages<br> <emilio> ... I'd love for it to be in some ua default<br> <TabAtkins> (i'm just gonna say that this was noted as actaully being helpful for Wikipedia; they currently manually set a bunch of counter styles for the different translations)<br> <emilio> ... but if it can't be it'd probably end up in some kind of reset/framework sheet<br> <fantasai> https://github.com/w3c/csswg-drafts/issues/7959#issuecomment-1592298287<br> <emilio> fantasai: there's some complications here<br> <miriam> ack fantasai<br> <emilio> ... see linked comment<br> <emilio> ... (a) you don't always want to translate the counter style, e.g. western digits might be used in other languages<br> <emilio> ... (b) some languages have multiple styles which might be designer-preference or so<br> <emilio> ... so I'm skeptic of adding something built-in<br> <emilio> ... it'd be relatively straight-forward to do this using `:lang()`<br> <emilio> ... what we don't have is a way to set a default counter-style for the counters function<br> <emilio> ... if we have that e.g. via a `counter-style` property then it'd be really easy to make this mapping<br> <miriam> ack florian<br> <TabAtkins> "relatively straightforward" is still hundreds of selectors, fwiw<br> <fantasai> s/mapping/mapping in the stylesheet/<br> <emilio> florian: I'm nervous, I' really like the vision of the international way, but this makes me nervous because it heightens the worry of the previous issue<br> <TabAtkins> and there are two types at least - numeric and writing - so a default counter() style won't satisfy it<br> <emilio> ... if you copy and paste it you check they're right, if you turn them on you likely at least checked<br> <emilio> ... it increases the chances of a wrong counter style appearing in the page if you need to do neither<br> <emilio> ... other concern is getting the mapping wrong<br> <emilio> ... e.g., japanese might not want to automatically switch to hiragana, I don't think it should be default<br> <r12a> q+<br> <emilio> ... if we were doing a couple or ten languages then we can probably figure it out<br> <fantasai> s/default/default, that would be jarring/<br> <emilio> ... but if we want hundreds, how often would we get it wrong in a way that's worse<br> <miriam> ack TabAtkins<br> <emilio> ?<br> <emilio> TabAtkins: if this is just a matter of UA rule then it is fixable<br> <florian> q+<br> <emilio> ... as we discover that they're wrong we can just get them fixed<br> <emilio> ... as the way it'd be designed you could override any of the mappings<br> <miriam> ack r12a<br> <emilio> r12a: what florian and fantasai were worried about is if this is baked into the browser<br> <TabAtkins> i'm happy to separate the "define the at-rule" part from the "and then put a default version of it into the UA stylesheet"<br> <emilio> ... proposal so far is to make it an author controlled rule for now<br> <emilio> ... I think that should be less problematic<br> <miriam> ack florian<br> <emilio> florian: what I'm about to say depends on whether this is auto-turned-on or not<br> <emilio> ... do authors need to opt in?<br> <emilio> TabAtkins: proposal is to define some new at-rule to define mapping from "generic family" to concrete style<br> <emilio> ... then there's the question of "should we have a default in the UA sheet"<br> <emilio> florian: the later makes me very nervous<br> <fantasai> +1 florian<br> <emilio> ... e.g., english is a roman-alphabet language and someone could consider using roman numerals<br> <fantasai> s/later/latter/<br> <emilio> ... sure we could fix it<br> <jensimmons> q?<br> <emilio> ... and in english we'd notice fairly easily<br> <emilio> ... but maybe not for smaller languages<br> <emilio> TabAtkins: I don't think we'd auto-apply it to ol<br> <fantasai> s/and someone could consider using roman numerals/, so suppose someone thought that it would be appropriate to use roman numerals, and then shipped it out across the Web. That would be very disruptive/<br> <emilio> ... but if auto-applying the mapping is controversial let's discuss that separately<br> <emilio> fantasai: I think we need a more specific proposal<br> <emilio> TabAtkins: assuming there's no objections I think we should pursue this idea<br> <emilio> [more discussion about auto-applying vs not]<br> <fantasai> s/sure we could fix it/sure, we could fix it--and for English it would happen quickly--but for a less common language, it could take a long time to bubble up/<br> <emilio> jensimmons: you wouldn't be declaring the whole counter styles, but you'd define the mapping to language and you'd have to use it in your list-style<br> <emilio> florian: as long as we don't auto apply <ol> in numeric types<br> <emilio> ... I'm fine<br> <TabAtkins> `@generic-counter-style digits { en-US: decimal; ...}`rather than `ol:lang(en-US) { list-style-type: decimal; } ...`<br> <emilio> jensimmons: instead authors would need to opt-in into this generic-digits<br> <miriam> ack fantasai<br> <emilio> fantasai: two thoughts. How much of this could be done using our existing mechanism using lang selectors with a `counter-style` property<br> <emilio> ... other question is, even with a new opt-in keyword for this and deployed that what I'd expect to see is that a lot of people that are authoring pages would use it and then get wrongly translated things in other languages<br> <emilio> TabAtkins: let's push that topic out<br> <emilio> ... not discussing applying anything automatically<br> <emilio> fantasai: not talking about that, just about any thing in the UA sheet<br> <emilio> ... if only for authors, do we need a new mechanism, or can we use :lang()<br> <emilio> TabAtkins: let's stop discussing the second point. Can authors do this today? yes<br> <emilio> ... see example above<br> <emilio> ... this would be essentially just sugar over that<br> <emilio> ... possibly a bit more efficient for browsers (less selectors?)<br> <emilio> ... but yeah it'd essentially be just sugar over selectors<br> <emilio> r12a: I don't think that's quite right<br> <emilio> ... in the labeled-digits example you can just use in the stylesheet to use digits<br> <emilio> ... so I think it's a little extra<br> <emilio> TabAtkins: no you can always just apply the language selectors you want yourself<br> <emilio> ... nothing fundamentally new or magical about it<br> <r12a> generic-counter-style: "digits" {<br> <r12a> 'ar':'arabic-indic',<br> <r12a> 'bn':'bengali',<br> <r12a> 'my':'myanmar',<br> <r12a> 'az-arab':'arabic-indic',<br> <r12a> 'suz':'my-own-sunuwar-style',<br> <r12a> .... }<br> <emilio> miriam: seems like back to the issue for the full proposal<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7959#issuecomment-1601234949 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 21 June 2023 16:59:14 UTC