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

So, as discussed on a recent i18n call, the above discussion is wrong, because `content: open-quote` (resp. `content: close-quote`) is not used on the `q` element, but on `::before` (resp. `::after`), which are children of the `q` element.

So what we would need to get the desired behavior is:
* a `quotes: match-parent` or `quotes: parent` or `parent-language` or `quotes: context` (to be bikesheded) value which **computes to** (and therefore inherits as) a set of strings describing the appropriate type of quotes based on the content language of the **parent** element
* Adding this to the user agent stylesheet
    ```css
    q { quotes: parent-language; }
    q q { quotes: inherit; }
    ```

With that in place, the pre-existing ua stylesheet rules
```css
q::before { content: open-quote; }
q::after { content: close-quote; }
```
would do what i18n expects.


`quotes: auto` could go back to computing to a set of strings describing the appropriate type of quotes based on the content language of the **current** element. This would not be used by `q`, but could be useful in other contexts, such as `blockquote` elements, which authors could opt into styling either with `auto` or `parent-language`. Alternatively, if resolving based on the current element's language that's considered useless in all contexts, `auto` can be the name we use for the `parent-language`

-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5478#issuecomment-2060353609 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:00:07 UTC