W3C home > Mailing lists > Public > public-tt@w3.org > July 2017

Space handling in <span> before <br>

From: Pierre-Anthony Lemieux <pal@sandflow.com>
Date: Mon, 10 Jul 2017 11:46:07 -0700
Message-ID: <CAF_7JxDqWYSPSBmnckyLB92aqwYE7UCOmD3iYdgsQ6d8Fd01Lw@mail.gmail.com>
To: "public-tt@w3.org" <public-tt@w3.org>
Good morning/evening,

Following-up on our discussion last week re: space handling in <span>
before <br>.

In the test at [1], should the SP after the "One" be presented?

[1] https://github.com/w3c/imsc-tests/blob/master/imsc1/ttml/br/br-in-p-001.ttml

Reading Section 7.2.3 in TTML1, I think one would conclude that the SP
should be suppressed since
white-space-treatment="ignore-if-surrounding-linefeed", which XSL
specifies as:

"Any glyph-area with a suppress-at-line-break value of 'suppress'
shall be deleted during line-building and inline-building if it would
be the first or last glyph-area descendant of a line-area."

As noted during the call and as an FYI, this is the CSS behavior in
Firefox but not in Chrome [2].

[2] https://codepen.io/palemieux/pen/PjeKyq

This might just be a bug in Chrome per [3].

[3] https://lists.w3.org/Archives/Public/www-style/2015Sep/0077.html

imscJS now deletes all SP before <br> prior to mapping to HTML [4].

[4] https://github.com/sandflow/imscJS/pull/58

Best,

-- Pierre
Received on Monday, 10 July 2017 18:47:02 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 5 October 2017 18:24:41 UTC