w3c / ttml2

Timed Text Markup Language 2 (TTML2)
https://w3c.github.io/ttml2/
Other
41 stars 16 forks source link

Equivalence between tts:textDecoration="none" and "noUnderline noLineThrough noOverline". #1138

Closed palemieux closed 4 years ago

palemieux commented 5 years ago

The specification does not conclusively state the equivalence between tts:textDecoration="none" and tts:textDecoration="noUnderline noLineThrough noOverline"

skynavga commented 5 years ago

What would be a possible interpretation that is not equivalent?

palemieux commented 5 years ago

... so, you agree that tts:textDecoration="none" and tts:textDecoration="noUnderline noLineThrough noOverline" are equivalent?

skynavga commented 5 years ago

Reviewing CSS2.1 [1], XSL-FO 1.1 [2][3], and CSS Text Decoration Module Level 3 [4], I see that the no* values were introduced by XSL-FO, and are not present in CSS. From both CSS2.1 and XSL-FO, the semantics of none are given as:

Produces no text decoration.

So, given that we don't support blink, I can't think of any way in which they are not equivalent. Can you? If we can't think of such a non-equivalent interpretation, then we don't need to say anything more, do we? [By practice, we don't go out of our way to repeat or emphasize logical consequences of other statements: at least we don't do so if we can't think of an alternative reading.]

As an FYI, I've posted a related question as an issue on [4], about which see https://github.com/w3c/csswg-drafts/issues/4188.

[1] https://www.w3.org/TR/2011/REC-CSS2-20110607/text.html#decoration [2] https://www.w3.org/TR/xsl11/#text-decoration [3] https://www.w3.org/TR/xsl11/#refine-text-decoration [4] https://drafts.csswg.org/css-text-decor-3/#text-decoration-property

nigelmegitt commented 5 years ago

Without feeling that I know the answer to this issue, a question it raises for me is how the special inheritance of individual values is affected by setting tts:textDecoration="none", especially considering that none is the initial value. For example are the following two examples distinct?:

Example 1: inherit with unspecified value, where initial value applies

<span tts:textDecoration="underline lineThrough overline">
  <span tts:color="lime">lime text with underline and line through and overline</span>
</span>

Example 2: inherit with specified value the same as the initial value

<span tts:textDecoration="underline lineThrough overline">
  <span tts:color="lime" tts:textDecoration="none">lime text with underline and line through and overline?</span>
</span>

Example 3: explicit override using component values

For reference, the following example is clear to me at the moment:

<span tts:textDecoration="underline lineThrough overline">
  <span tts:color="lime" tts:textDecoration="noUnderline noLineThrough noOverline">lime text with no underline and no line through and no overline</span>
</span>
skynavga commented 5 years ago

@nigelmegitt as TTML has defined it, the inner span inherits the computed tuple (underline, lineThrough, overline) in all three examples; in example 2, the inner span's computed tuple is (noUnderline, noLineThrough, noOverline), and the same holds for example 3;

nigelmegitt commented 5 years ago

@skynavga right, that means that there is exact equivalence between a specified value of "none" and a specified value of "noUnderline noLineThrough noOverline" and that omission of the attribute is not the same as specifying its initial value; that omission-is-not-default behaviour is consistent with other inheritable style attributes of course.

palemieux commented 5 years ago

in example 2, the inner span's computed tuple is (noUnderline, noLineThrough, noOverline)

I am not sure how this works since "none" is indistinguishable from "noUnderline noLineThrough noOverline", i.e. examples 2 and 3 are identical.

A perhaps subtle difference is that "none" means no decoration whatsoever whereas "noUnderline noLineThrough noOverline" means no underline and no line-through and no overline, which is equivalent as long as no additional text decorations are introduced.

skynavga commented 5 years ago

Added to TPAC Agenda, https://www.w3.org/wiki/TimedText/tpac2019#Topics.

css-meeting-bot commented 4 years ago

The Timed Text Working Group just discussed Equivalence between tts:textDecoration="none" and "noUnderline noLineThrough noOverline" #1138, and agreed to the following:

The full IRC log of that discussion <cyril> Topic: Equivalence between tts:textDecoration="none" and "noUnderline noLineThrough noOverline" #1138
<cyril> github: https://github.com/w3c/ttml2/issues/1138
<cyril> nigel: in practice right now they are the same
<cyril> cyril: in this case, example 2 and 3 should give the same result?
<cyril> nigel: yes
<cyril> ... but if this was CSS it wouldn't be the same
<cyril> ... example 2 the textDecoration would be displayed
<cyril> ... example 3 is not possible in CSS because there are no values equivalent to no*
<cyril> ... you just can't do it
<cyril> ... once underlined has been applied at a parent level, you cannot un-apply it
<cyril> glenn: in TTML, it does punch a hole
<cyril> pal: is none identical to specifying the 3 no*
<cyril> glenn: yes
<cyril> cyril: at least we need a note that none here behaves differently from none in CSS
<cyril> glenn: the no versions are also different
<cyril> cyril: because you can undo them and not in CSS
<cyril> glenn: yes
<cyril> ... this is a feature where we are diverging from CSS
<cyril> ... that does not mean you cannot map TTML to CSS
<cyril> pal: it is not inherited in CSS
<cyril> nigel: the only way to get rid of the text decoration is to use an inline block
<cyril> nigel: we need a note to explain that none is equivalent to no*
<cyril> ... and in the semantic derivation that there are differences (inheritance behavior
<cyril> glenn: we could put it directly in the text decoration definition
<cyril> pal: 2 different notes: TTML-level and CSS/TTML difference
<cyril> SUMMARY: we agree with having 2 notes, and let the editor decide where they go