Re: [css-break] does box-decoration-break control margins?

On 04/07/2015 07:15 PM, Mats Palmgren wrote:
> On 04/06/2015 10:32 PM, Håkon Wium Lie wrote:
>> In the introduction to the 'box-decoration-break' property, the
>> property claims to describe:
>>
>>     "whether the box's margins, borders, padding, and other decorations
>>     wrap the broken edges of the box fragments"
>>
>>     http://www.w3.org/TR/2014/WD-css3-break-20140116/#box-decoration-break
>>
>> However, in the description of the keyword values, margins are not
>> mentioned. So, it seems that the word "margins" should be removed from
>> the text quoted above, no?
>
> Why do you think it should be removed rather than added to the description
> of the keyword values?
>
> FYI, Firefox has already shipped 'box-decoration-break' and we apply
> margins to each fragment for 'clone'.

The CSSWG discussed this, and based on your feedback agreed to add
back in the margins bit.
   https://lists.w3.org/Archives/Public/www-style/2015May/0279.html

However, when I was doing the editing, I ran into one potential issue:
At the top of the page, you usually want to consume margins, so that
the content is flush with the top of the page. The exceptions to these
cases are usually after forced breaks, e.g. the start of a new chapter.
So the current rules for margins are that they are consumed for unforced
breaks, but are preserved for forced breaks.
   http://dev.w3.org/csswg/css-break/#break-margins

Cloned margins would thus get consumed during pagination (but not for
inlines), which is what we think we want.

That's all fine, but suppose we have an element with cloned margins
that's then got a forced break *inside* it. That break counts as a
forced break, and thus the cloned margins would not get consumed.
They probably should, since from the cloned box's perspective, there
shouldn't be a difference in its behavior between its descendant
content deciding on a forced break vs. unforced break.

So I think I'm going to add in that exception. But I wanted to bring
it up, in case I'm missing something here.

~fantasai

Received on Thursday, 16 July 2015 19:59:16 UTC