Re: Issue-286 padding

On Thu, Dec 19, 2013 at 1:11 PM, Glenn Adams <glenn@skynav.com> wrote:

>
> On Wed, Dec 4, 2013 at 9:11 AM, Nigel Megitt <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.
>>
>
> Actually, I don't agree that span based padding wouldn't work. It would
> work if accompanied by box-decoration-break:clone. That is, the following
> HTML excerpt would produce the results of your example while handling
> different line breaks properly. The only problem is that I can't find a
> browser that implements clone on padding. Opera implements clone on border
> and shadow, but not on padding (yet) -- I've reported a bug.
>
> <p><span style="background-color: #CCC; padding: 0px 20px;
> box-decoration-break: clone; font-size: 64pt; font-family:
> monospace;">Beware the Jubjub bird, and shun The frumious
> Bandersnatch!</span></p>
>

A bit more investigating finds that this works on Chrome 31 by adding
-webkit- prefix as follows:

<p><span style="background-color: #CCC; padding: 0px 20px;
-webkit-box-decoration-break: clone; font-size: 40pt; font-family:
monospace;">Beware the Jubjub bird, and shun The frumious
Bandersnatch!</span></p>



>
>
>>
>>  Nigel
>>
>>   On 13/11/2013 16:07, "Glenn Adams" <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>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]
>>> *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> 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> 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 Friday, 20 December 2013 03:38:24 UTC