Re: [csswg-drafts] [css-content] Quote character choice must depend on surrounding language, not language of the quotation (#5478)

This issue was discussed in [a meeting](https://www.w3.org/2024/04/16-i18n-minutes.html).

- No actions or resolutions
<details><summary><i class="differentiate">View the transcript</i></summary>
w3c/csswg-drafts#5478<br/>
Issue 5478 [css-content] Quote character choice must depend on surrounding language, not language of the quotation (by r12a) [css-content-3] [Closed Accepted by CSSWG Resolution] [i18n-needs-resolution] [Agenda+ i18n]<br/>
<b>fantasai:</b> it's been edited and I haven't republished the draft yet<br/>
<b>florian:</b> does that include that part needs to go into the UA style sheet, or just the mechanics of it?<br/>
<b>florian:</b> make the initial value do the right thing, or make the UA style sheet do the right thing?<br/>
<b>fantasai:</b> the only way to do that automatically would be to make the value of the quote property to depend on @@<br/>
… without a separate selector I don't think it's possible to get it to do the right thing<br/>
… that brings up a question of the selectors might not be the most efficient<br/>
<b>florian:</b> @@1<br/>
<b>fantasai:</b> if what you're trying to do is as soon as you hit a q element then you lock it down you could do it on any child<br/>
&lt;fantasai> q > * { quotes: match-parent; }<br/>
<b>xfq:</b> do you mean the author should specify this?<br/>
<b>r12a:</b> that's the thing I'm arguing against<br/>
… I don't think the author needs to remember or find out how to make the default expectation<br/>
… and it should happen by default<br/>
<b>&lt;fantasai&gt;</b> q { quote: auto-compute-me-now; } /* iherits as string value */<br/>
<b>r12a:</b> whether that happens because we put something in a style sheet or whether that happens because the initial value<br/>
<b>florian:</b> do you think browsers will be happier with @@?<br/>
<b>fantasai:</b> I don't know<br/>
<b>florian:</b> but you're probably reasonably well-positioned to ask people who would know<br/>
<b>xfq:</b> @@<br/>
<b>r12a:</b> it's not supposed to respond to changes in languages further down<br/>
<b>fantasai:</b> it's because if you set the initial value to a value on the root element and it computes on the root element rather than inheriting the auto<br/>
… from what I understand, you don't want either of these behaviours<br/>
<b>florian:</b> and I think the thing with a selector in the UA style sheet does give us the right behaviour<br/>
… it's just not the kind of thing we typically want to<br/>
<b>xfq:</b> what's the next step?<br/>
<b>fantasai:</b> we can go back to browser vendors and ask them which approach they want to take here<br/>
<b>florian:</b> can we agree on a UA style sheet rule that is the most performant and acceptable we can think of<br/>
… that gives us the behaviour we want and then we tell the browsers are you either willing to implement this or do you have another suggestion?<br/>
<b>florian:</b> you want the first q element in the hierarchy<br/>
… lock down every descendant of it<br/>
<b>fantasai:</b> right now we have match-parent, but instead of computing against the parent's language it computes against your own language<br/>
… which is match-self<br/>
<b>&lt;fantasai&gt;</b> <p lang=fr>Some text <q lang=en> more text <q lang=zh> inner text</q></q></p><br/>
<b>fantasai:</b> so we have this, what you want here is you want French quotations all the way through<br/>
<b>r12a:</b> yeah<br/>
<b>florian:</b> the auto keyword means that you pick a quotation system based on the content language of the parent<br/>
… so exactly what we want on the first q element<br/>
<b>fantasai:</b> instead of saying it matches the same quotation mark system as the parent, we want a keyword that computes against the parent<br/>
… you can't do that as initial value because it breaks stuff<br/>
<b>florian:</b> effectively that's kind of what match-parent does<br/>
… match-parent gets that string from above, while auto doesn't and re-resolves it everywhere<br/>
<b>fantasai:</b> what are impls do currently is a good question<br/>
<b>florian:</b> they do the wrong thing<br/>
<b>&lt;fantasai&gt;</b> auto = resolve against the current element's language<br/>
<b>&lt;fantasai&gt;</b> (and inherit as 'auto', so re-resolve on each element)<br/>
<b>&lt;fantasai&gt;</b> match-parent = resolve against the parent eleent's langauge<br/>
<b>&lt;fantasai&gt;</b> (and inherit as that string, so don't re-resolve)<br/>
<b>florian:</b> when do you ever want to resolve against the current element's language?<br/>
<b>fantasai:</b> @@<br/>
<b>florian:</b> from my point of view, the way you have it specified now, is precisely the behaviour you want<br/>
… as far as the q element is concerned<br/>
<b>florian:</b> what do you want for blockquote?<br/>
<b>florian:</b> possibly the same, but I'm not sure<br/>
<b>r12a:</b> I don't think a blockquote is the same thing as a q element<br/>
… I'm just thinking off the top of my head at the moment<br/>
… a blockquote is bit of text that you indented usually<br/>
… the blockquote at the top level would take the quotes of the surrounding language<br/>
… but inside of it, it's different<br/>
<b>florian:</b> in that case, we're fine<br/>
… I still think we're on the right behaviour with the spec as it is plus the UA style sheet rule<br/>
<b>fantasai:</b> here's a fun wrinkle I think we didn't think about<br/>
… if the quote is not generated by the q element, but by ::before, which is a child of the q element<br/>
… match-parent should use the language tag of the parent to resolve to a string<br/>
<b>florian:</b> @@<br/>
… that's still not good enough, it's good enough to make it work, but we also need to disable that on descendant <q>s<br/>
<b>florian:</b> I thought we had the solution, but I forgot the ::before in the child<br/>
<b>r12a:</b> I find it very difficult to follow all the stuff you're talking about because I don't know the technical details<br/>
<b>florian:</b> I think we really understand the use case that you want to achieve, but it's surprisingly tricky to get there<br/>
<b>&lt;fantasai&gt;</b> q { quotes: match-parent; } q q { quotes: inherit; }<br/>
<b>&lt;r12a&gt;</b> fuqiao, here's a link: r12a/mins2issue<br/>
<b>fantasai:</b> this is not as bad as an universal selector because q is not very often used<br/>
… even if you have to walk up the parent up to the route every time you hit a queue, you're not gonna hit a q very often<br/>
… so it won't regress most pages probably<br/>
<b>florian:</b> we now have a definition that probably works and a selector that's less problematic<br/>
… still not amazing, but probably works<br/>
… maybe we should update the spec<br/>
… and talk with the browser vendors<br/>
<b>fantasai:</b> that seems reasonable<br/>
… back to blockquote<br/>
<b>florian:</b> maybe it's just parent, not match-parent<br/>
<b>fantasai:</b> auto-parent or something like that<br/>
<b>florian:</b> we should write it down<br/>
<b>fantasai:</b> and ask the browser vendors<br/>
<b>florian:</b> I'm curious how often is this something people run into and complained about<br/>
<b>xfq:</b> I've seen some real examples in paper books<br/>
<b>r12a:</b> I've seen real web pages too<br/>
… I use the q element myself<br/>
… it's really useful for things like translation<br/>
… you don't have to go through all the hard coded quote marks and change them<br/>
… you just change the CSS<br/>
</details>

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


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

Received on Wednesday, 17 April 2024 05:20:44 UTC