- From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
- Date: Mon, 01 Aug 2022 18:10:16 +0000
- To: public-css-archive@w3.org
> We don't think the content author is able to guess what languages are supported by the user agent Agreed. But to me, that supports that current design. Here's an example: If you want to do "word" based line breaking for titles in Japanese, instead of the typical between-every-letter line breaking, assuming you have `<wbr>`s (or U+200B) in your markup, you can do this: ```css h1:lang(ja) { word-break: keep-all; } ``` If you don't have `<wbr>`s (or U+200B) in your markup, and want to auto detect the word boundaries, you wouldn't want to merely do this: ```css h1:lang(ja) { word-boundary-detection: auto(ja); word-break: keep-all; } ``` Because if the UA doesn't know how to do boundary detection in Japanese, the text will overflow, due to a lack of wrapping opportunities. So instead, what you'd do is something like that: ```css @supports( word-boundary-detection: auto(ja) ) { h1:lang(ja) { word-boundary-detection: auto(ja); word-break: keep-all; } } ``` But if we change the spec not to supply a language parameter to the word-boundary-detection property, you can no longer do that. > (Question: would it be reasonable to enforce user agents who do not support a language to insert word boundaries chars everywhere a break is allowed normally, to use as a fallback?) If word-boundary-detection was exclusively for line breaking, I suppose that could work, but if you're using it with [word-boundary-expansion](https://www.w3.org/TR/css-text-4/#word-boundary-expansion), then that's the wrong fall-back. In that case, if word-boundary-detection doesn't work for the target language, you'd want to do no expansion, rather than expansion between (almost) every letter. -- GitHub Notification of comment by frivoal Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7193#issuecomment-1201541637 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 1 August 2022 18:10:17 UTC