Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-text] line-break: strict should use UAX#14 rule? #9432

Closed
makotokato opened this issue Oct 3, 2023 · 5 comments · Fixed by #9997
Closed

[css-text] line-break: strict should use UAX#14 rule? #9432

makotokato opened this issue Oct 3, 2023 · 5 comments · Fixed by #9997

Comments

@makotokato
Copy link

Mozilla is working to replace old line breaking code with UAX#14 compatible line breaking rules. Although Blink and WebKit use ICU4C to implement line breaking, both uses different rules with Unicode Standard Annex (See https://bugzilla.mozilla.org/show_bug.cgi?id=1848049 for details) for ASCII characters when checking behavior.

According to code comment, it seems to be for a compatibility of old browsers. So when using ASCII character, it doesn't match with UAX#14. Example, https://wpt.fyi/results/css/css-text/i18n/css3-text-line-break-baspglwj-026.html?label=experimental&label=master&aligned is failed on WebKit and Blink now.

So I think that we should use UAX#14 rules if line-break: strict. It is clear for line breaking compatibility for future. How do you think?

@frivoal
Copy link
Collaborator

frivoal commented Oct 3, 2023

UAX14 covers a lot of things, much of which is tailorable, some of which is required by css-text, and some of which is overriden by css-text. Could you be a bit more specific about which part of UAX14 you're thinking of adopting?

For what it's worth, I think that what @jfkthame is saying in https://bugzilla.mozilla.org/show_bug.cgi?id=1848049 is very reasonable, and as far as I can tell, is neither required nor forbidden by css-text.

@fantasai
Copy link
Collaborator

The spec deliberately leaves line-breaking fairly open-ended, and doesn't require UAX14 compatibility, because UAX14 is known to not be an ideal line-breaking implementation, merely a reasonable baseline to start from. So I'm not sure the spec should change here: as Florian says, it allows what Mozilla wants to do already.

@fantasai
Copy link
Collaborator

@makotokato Is it OK to close this issue, or do you want us to raise it with the CSSWG?

@birtles
Copy link
Contributor

birtles commented Feb 23, 2024

I discussed this with @makotokato and based on @jfkthame's feedback I think we'd like to add an informative note regarding the sort of deviations from UAX#14 that implementers might want to consider for compatibility's sake. I can try to draft that next week if I'm available (feel free to steal it from me though) but for now I'd like to keep this issue open.

@birtles
Copy link
Contributor

birtles commented Feb 26, 2024

I made up a strawman note over in #9997 (nearly 10,000!). I'll be on leave for the next few weeks so I can't promise I'll be able to address any feedback. Feel free to take it over and fix as you like!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants