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

Clarify which style properties do not apply to ruby containers #1071

Conversation

palemieux
Copy link
Contributor

@palemieux palemieux commented Apr 25, 2019

Closes #1043
Closes #1078
Closes #1080
Closes #1082
Closes #1084
Closes #1086
Closes #1100

Copy link
Contributor

@nigelmegitt nigelmegitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be simplified to remove repetition by factoring the spans into two classes with defined terms, one of which is "all spans" and the other is the spans excluding ruby container, etc.

Copy link
Collaborator

@skynavga skynavga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot accept this suggested alternative to #1069 as it violates editorial and design principles that have been consistently applied to the TTML specifications. Please suggest specific changes you wish to see in #1069. However, such changes should not include text to be added/changed in each individual property; rather, the correct place to document inapplicability constraints is in §10.2.35.1 as is presently done by #1069.

@palemieux
Copy link
Contributor Author

as it violates editorial and design principles that have been consistently applied to the TTML specifications.

I see no evidence behind that statement. In fact, TTML today clearly specifies to which vocabulary each style property applies.

@skynavga
Copy link
Collaborator

skynavga commented May 9, 2019

@palemieux the general design/editorial principle in play here is: do not specify something (in normative text) which is a logical consequence of other normative statements; in the current case, you have proposed adding qualifying language (i.e., claiming non-applicability) for 18 style attributes;

a close reading of each of these attributes' specifications show that 3 of them still need to apply to ruby container spans (tts:direction, tts:wrapOption, and tts:unicodeBidi), and that all but one of the remaining 15, namely, tts:textDecoration, cannot logically apply since there are no generated glyph area children or glyph area children of an inline area generated by a child anonymous span;

that leaves us with only one possibly case to consider, tts:textDecoration; now, the current language in TTML2 (§10.2.43) says it applies "to glyph areas or other inline areas", and, reading XSL FO 1.1 (§4.9.5 and §7.17.4) and CSS 2 (§16.3.1), and particularly the latter, we find the following

Underlines, overlines, and line-throughs are applied only to text (including white space, letter spacing, and word spacing): margins, borders, and padding are skipped. User agents must not render these text decorations on content that is not text. For example, images and inline blocks must not be underlined.

now, since we have already specified that non-LWSP text is forbidden from ruby container spans and we will have added (in #1069) that LWSP is ignored for presentation processing, then there is no text (including white space, letter spacing, and word spacing), i.e., no glyph areas to which text decoration could be logically applied;

in evaluating these details, it is quite clear that we do not have to specify that something does not apply to something that cannot be present or is explicitly ignored; consequently, the note added by #1069 to §10.2.35.1 suffices, by reminding the reader of this fact (and that does not need to be otherwise stated in normative text);

notwithstanding the above, I believe there are a few improvements we could make in #1069, such as

  • make clear that tts:fontSelectionStrategy, tts:fontVariant, and tts:textCombine apply only to glyph areas;
  • remove or other inline areas from the preamble for tts:textDecoration and tts:textEmphasis

@palemieux
Copy link
Contributor Author

@skynavga Your argument is disproved by the simple fact that character-based style attributes do not apply to region, div, etc...

@skynavga
Copy link
Collaborator

skynavga commented May 9, 2019

@palemieux you keep mixing up applicability of styles to elements and applicability of styles to elements in a specific context; character styles can never apply to region, div, etc., since they can never contain text to which it might apply; on the other hand a span can always contain text, and, therefore, character properties generally apply unless something makes such application logically impossible for other reasons, for example, not having any generated glyph area children to which it might apply; we don't say that "character styles" don't apply to empty spans, do we? in any case, you are neglecting the entirety of my detailed response by replying in such a flippant manner without considering the details

@palemieux
Copy link
Contributor Author

@skynavga According to CSS 2.1, applies to" indicates whether properties have no rendering effect on some types of elements. tts:textEmphasis, for instance, have no rendering effect on ruby containers, and thus does not apply to ruby containers.

@skynavga
Copy link
Collaborator

skynavga commented May 10, 2019

@palemieux I guess I need to say it for a 3rd, or is this the 4th time, a ruby container is not an element; a span is an element; what is the point you are trying to make in all of these repetitive claims about applicability? have you read my detailed response at #1071 (comment) ?

@nigelmegitt
Copy link
Contributor

I've re-read @skynavga 's #1071 (comment) and agree that the text decorations are not supposed to create any marks other than on text content, and since there isn't any in a container span, we don't need to say anything. The screenshot at #1043 (comment) therefore looks like a browser bug.

I haven't checked that similar wording applies to all the other style properties that seemingly should not cause any marks to be made if applied to a container span. @skynavga or @palemieux did you check that?

@skynavga
Copy link
Collaborator

@nigelmegitt yes, I checked the specification text for each of the 18 properties, as I stated in #1071 (comment), 3 of those actually should apply (bidi and wrap related), and the other 15 cannot apply because they semantically apply only to glyph areas

@palemieux
Copy link
Contributor Author

the other 15 cannot apply because they semantically apply only to glyph areas

@skynavga You are missing my point. I am arguing for specification clarity, and providing unambiguous guidance to implementers. According to your analysis, the applicability of style properties is not trivial. The applies to attribute of each style property definition provides a simple and straightforward means to communicating this applicability. If tts:textDecoration does not apply to span elements that are ruby containers, then applies to should note this,

@skynavga
Copy link
Collaborator

@palemieux tts:textDecoration and all the other 17 properties you want to constrain do apply to spans including spans that serve as ruby containers; 3 of these 18 apply in general, and the other 15 apply to glyph areas generated by the affected spans, and, since there are no glyph areas, application is a NO-OP; so we don't need to say anything at all, but we have at least added a comment in §10.2.35.1 that points out this fact; so your claim that these properties do not apply is not correct, they do apply;

palemieux added 5 commits May 28, 2019 21:00
…cation' into issue/1043-character-styles-do-not-apply-to-ruby-containers
…tion' into issue/1043-character-styles-do-not-apply-to-ruby-containers
…gy-application' into issue/1043-character-styles-do-not-apply-to-ruby-containers
…ion' into issue/1043-character-styles-do-not-apply-to-ruby-containers
…ion' into issue/1043-character-styles-do-not-apply-to-ruby-containers
@palemieux
Copy link
Contributor Author

@nigelmegitt and @cconcolato I have introduced the defined term "ruby container span" as suggested.

@palemieux palemieux requested a review from cconcolato May 29, 2019 04:14
spec/ttml2.xml Outdated
@@ -12094,7 +12100,10 @@ if the computed value of <att>tts:ruby</att> of a <loc href="#content-vocabulary
<item><p>the computed value of <att>tts:ruby</att> of each of its child elements is not <code>none</code>;</p></item>
<item><p>the computed value of <att>tts:ruby</att> of its first child element is <code>baseContainer</code>
or <code>base</code>;</p></item>
<item><p>each of its text node children contain only <loc href="#style-value-lwsp">&lt;lwsp&gt;</loc>;</p></item>
<item><p>each of its text node children and <loc href="#terms-anonymous-span">anonymous span</loc> children
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as in the other PR, I think the presentation processing behavior should not be mixed with the content model. I'd prefer having a separate paragraph.

Copy link
Contributor

@cconcolato cconcolato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the individual comment, it looks good to me.

Copy link
Contributor

@nigelmegitt nigelmegitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a TTWG member, looks good to me.

As Chair, noting that we do not currently have consensus to merge this, I'm going to mark it as "Request Changes", but not because of any objection from me individually. If we can reach consensus for these changes then I'll change it to Approve.

@nigelmegitt nigelmegitt dismissed their stale review May 29, 2019 17:07

Chair's block not needed because there's a member block already

@palemieux
Copy link
Contributor Author

Overtaken by #1100, #1129 and #1130.

@palemieux palemieux closed this Jul 11, 2019
@skynavga skynavga deleted the issue/1043-character-styles-do-not-apply-to-ruby-containers branch August 29, 2019 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment