Re: Issue-286 padding

In case of doubt (about how many <p>s are intended), the equivalent TTML fragments would be something like:

<region xml:id="r1">
   <style tts:padding="Rbefore Rend Rafter Rstart">
</region>

…

<p region="r1" tts:padding="Lbefore Lend Lafter Lstart" tts:backgroundColor="gray">
Beware the Jubjub bird, and shun
</br>
The frumious Bandersnatch!
</p>

Where the </br> is positioned to be coincident with where an automatically generated line break would fall anyway because the first line fully occupies the available foreground text layout width. In other words the example isn't changed by the presence of the <br> assuming the initial value of tts:wrapOption, i.e. "wrap". In normal practice I'd expect the author to specify line breaks and not rely on this, but that's a separate topic.

Nigel


On 04/12/2013 16:11, "Nigel Megitt" <nigel.megitt@bbc.co.uk<mailto:nigel.megitt@bbc.co.uk>> wrote:

Specifically on padding, the EBU discussed this requirement further last week and agreed that the requirement that foreground layout must not be affected can be relaxed: even though it's not the ideal solution it does have a safe fallback. This in turn permitted a revised requirement that should be easier to implement in CSS and can be expressed as a definition of tts:padding on <p>, which is currently not defined in TTML. The attached diagram explains the expected behaviour, i.e. that padding is applied to each rendered line and acts very much like a line-based version of region padding.

Note that this solution does not define <span> based padding which wouldn't really work here – the padding would interfere with intended spacing. However EBU does not have a requirement for this.

Nigel

On 13/11/2013 16:07, "Glenn Adams" <glenn@skynav.com<mailto:glenn@skynav.com>> wrote:

The attached shows the difference between putting the background/padding on span versus p. Take your pick.



On Wed, Nov 13, 2013 at 12:15 PM, Nigel Megitt <nigel.megitt@bbc.co.uk<mailto:nigel.megitt@bbc.co.uk>> wrote:

Thanks Glenn,

I'm not sure this meets the described rowPadding requirements - the padding appears to be attached to the <p> not the rendered rows of text, so if an automatic (i.e. not explicit) line break is inserted the padding isn't added to the new rows. Is there a way to extend it to do that as well?

Nigel

________________________________
From: Glenn Adams [glenn@skynav.com<mailto:glenn@skynav.com>]
Sent: 13 November 2013 03:03
To: TTWG
Subject: Re: row align and padding

Here's are two versions that work on Safari. For Safari 6.0.5 or earlier, use the one labeled old syntax. For 6.1 and 7.0, use the other (which uses new syntax). Safari still requires use of the "-webkit-" prefix in both cases.


On Wed, Nov 13, 2013 at 5:09 AM, Glenn Adams <glenn@skynav.com<mailto:glenn@skynav.com>> wrote:
Simplified and clean up example, using single <p> for each caption's text (instead of separate p per line).


On Tue, Nov 12, 2013 at 5:56 PM, Glenn Adams <glenn@skynav.com<mailto:glenn@skynav.com>> wrote:
The attached uses to CSS3 Flexbox and a few other properties to produce the desired effects for the row align and padding examples I've seen. It works on current versions of Chrome, Firefox, and Opera. It doesn't seem to work on Safari 6.0.5. I haven't tested IE, but supposedly IE10 and following supports Flexbox.





----------------------------

http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.

---------------------




----------------------------

http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.

---------------------

Received on Thursday, 5 December 2013 12:22:40 UTC