-
Notifications
You must be signed in to change notification settings - Fork 682
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-decor] The emphasis marks should appear under horizontal Chinese text #10167
Comments
The specification looks like it's already specified, so it seems to be a bug in the Chrome implementation. |
This is in a note (non-normative text), and IMO is for the author rather than the implementer. |
So maybe the default UA stylesheet should include something like:
Another option would be to define an Alternatively, this is the responsibility of authors; the spec is just mentioning it for information. |
Fwiw, i created an interactive test for this at w3c/character_phrase_tests#67 I think this should probably happen by default – ie. not be the responsibility of authors, because otherwise they'd have to remember to add special styling for every document they produce with emphasis in it. Seems an unnecessary imposition. |
Agreed that it should be specified, but I feel odd if we need to specify the default behavior for a specific language in a CSS spec. CSS specs should be more general. Maybe clreq (https://www.w3.org/TR/clreq/#interlinear_annotations) is a better place? |
Appendix B: Default UA Stylesheet /* set language-appropriate default emphasis mark position */
:root:lang(zh), [lang|=zh] { text-emphasis-position: under right; }
[lang|=ja], [lang|=ko] { text-emphasis-position: over right; } I haven't checked whether Blink has implemented this or not, sorry, but if not, this looks like an implementation issue. |
This seems like the better way to go. |
Both clreq and the Appendix B of css-text-decor are non-normative. I still think normatively specifying the behavior would be useful, since it will affect conformance and will be covered by tests in wpt, so that the expected behaviour can be promoted. |
We should probably make Appendix B normative, to the extent that it is Web-compatible. @kojiishi do you have any concerns with any of the rules, or should we propose this change? |
Do we know which rules are web compatible and which are not? |
@kojiishi, the following rules in Appendix B are already in the HTML spec's UA stylesheet: s, strike, del {
text-decoration: line-through;
}
u, ins, :link, :visited {
text-decoration: underline;
}
abbr[title], acronym[title] {
text-decoration: dotted underline;
} So those should be totally safe. The rest is: blink {
text-decoration-line: blink;
}
/* disable inheritance of text-emphasis marks to ruby text:
emphasis marks should only apply to base text */
rt { text-emphasis: none; }
/* set language-appropriate default emphasis mark position */
:root:lang(zh), [lang|=zh] { text-emphasis-position: under right; }
[lang|=ja], [lang|=ko] { text-emphasis-position: over right; }
/* set language-appropriate default underline position */
:root:lang(ja), [lang|=ja],
:root:lang(mn), [lang|=mn],
:root:lang(ko), [lang|=ko] { text-underline-position: right; }
:root:lang(zh), [lang|=zh] { text-underline-position: left; }
/* auto is chosen (implied) above instead of under
due to content-compatibility concerns */ This all seems likely to be safe to me, but I don't have data to back it up. |
Nice, thank you for finding this. Then how about linking to it instead of duplicating? For the rest, probably we shouldn't include |
For |
https://www.w3.org/TR/css-text-decor-4/#text-emphasis-position-property
The expectation is that for horizontal text browsers will, by default (ie. when
text-emphasis-position
is not set), position emphasis marks above Japanese text, but below Chinese text. Currently, this is not the case. See some tests.Not sure this should be specified in the CSS spec or the CSS user agent style sheet, so filing an issue here.
The text was updated successfully, but these errors were encountered: