-
Notifications
You must be signed in to change notification settings - Fork 669
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-3] behavior of text-decoration + text-emphasis #160
Comments
Interaction between decoration lines and emphasis marks could be complex (mostly because decoration line is complex). Text could be vertical aligned to some other place, which could be very far from the decoration line, and the relative position of the text and decoration line could even be reversed. There could also be multiple decoration lines, and they could be much further from the text as well. Those kinds of cases may not be as important as the main usecases, but I think they should still be considered when specing the behavior, so that they would at least have a reasonable result. |
@realskk Could you provide more information about what rule are you using to archive that result? What would the behavior be for the cases I mentioned in the comment above? |
For example what behavior would be for this code? <span style="text-emphasis: circle; text-decoration: overline">CO<sub>2</sub></span> |
@upsuper Did I answer what you asked?? |
My question was, where should the emphasis marks be? |
I wonder that the current editor's draft of 'text-underline-position' says in note that the line can be drawn line-through (as attached). But in case of the example below, where the emphasis mark can be drawn? If the line is drawn on top of the line as spec describes and emphasis mark is drawn on top of the line as shown by me, then the emphasis mark can be put on the character "2". CO2 |
That example is showing a bad result. :) The UA should ideally not do that, is what it's saying. Maybe I should make the example clearer... Underline/overline should be between the text and the ruby/emphasis marks. It's a bit complicated as you note in cases with varying font size or vertical alignment. I think maybe we need to add something like “The position of ruby and of text-emphasis dots may be adjusted in order to avoid text decoration lines.” |
@realskk Another question, is the position of emphasis marks affected by presence of decoration lines? I mean, in the CO2 example, if there is no overline, should the emphasis marks be placed differently? |
>. Adjust wording in subsequent paragraph to help distinguish the two cases (baseline alignment vs. baseline shift). #160
…hey conflict with underlines/overlines. <#160>
OK, I checked in two sets of changes. First to clarify the note to address @realskk's confusion about the behavior in the note--you can see the new text and a new image in the editor's draft. Second set of changes adds the following text to CSS Ruby and references it from the definition of
I'm open to additional suggestions/improvements, this is just a first pass. Let me know what you think. Also, @realskk is it OK if I use your image in the spec? Also, it seems to me that the variation in the emphasis marks' position and size in those examples is awkward, shall I open an issue on that for Text Decoration Level 4? |
(At F2F, I told to fantasai, that using image is OK, of course. Let me have more time for replying actually.) |
Filed #1892 on maintaining size and position, which is also relevant to @upsuper's question. Still need some feedback on whether the changes in #160 (comment) are enough or if there are further clarifications we'd like to make! |
As discussed in web-platform-tests/wpt#3318 (comment). This behavior (or something similar) has already been implemented in Blink and so there are not expected to be significant compatibility issues from this change. This closes w3c#160.
Note: @upsuper filed #1918 for discussion of further details in css-ruby. If everyone's OK with the current allowances, I would like to close this issue. For reference again, the added text is CSS Ruby Level 1:
CSS Text Decoration Level 3:
|
I don't really think #1918 covers some of the issues (specifically that what happens when font size changes in the piece of text). #1918 was merely for that ruby can conflict with decoration lines even if all text has the same size and position. The interaction between them with changed font size and vertical position feels more complicated. I think I have a question to @realskk not answered that: is the position of emphasis marks affected by presence of decoration lines? I mean, in the CO2 example, if there is no overline, should the emphasis marks be placed differently? It is not clear to me what the answer should be, and I think that would affect how the spec should work. |
This question can apply to ruby as well. Is the position of ruby annotation of text which has different size / vertical position affected by decoration lines? |
I think that the spec mentions behavior of text-emphasis + ruby (see below) but doesn't say behavior of combination of text-decoration and text-emphasis.
From an aesthetic point of view, text-decoration and text-emphasis should be separated from each other.
Furthermore, I feel that we have to think more complex pattern such as mixing text-decoration, text-emphasis and ruby.
See also: https://bugzilla.mozilla.org/show_bug.cgi?id=1262792
The text was updated successfully, but these errors were encountered: