Re: [css-regions] The region-overflow property

Hi Alan,

On Oct 5, 2011, at 3:13 PM, Alan Stearns wrote:

Vincent,

I’ve attached a picture. In the first column, I have two regions that fit the flow content. But the red content overflows the first region horizontally.

In the second column I only have one region, and I’ve used region-overflow:break and overflow:visible.

>> Thanks for the image, it is great to clarify your thinking. And it made me understand where I think the disconnect is. This setting (region-overflow:break, overflow:visible) would give you what you want (the last thing you have to the right). With a region-overflow: break, the flow is broken as if there was another region after it. The content that follows the break is not rendered.

>> The second column would be region-overflow:auto, overflow: visible.

Cheers,
Vincent



In the third column I’ve used region-overflow:break and overflow:hidden.

What I want is in the fourth column, and I don’t think I can get it without a “clip in the pagination direction only” setting. It’s displaying the first region “as if there was another region” in the flow, and neither of the other two are.



Alan

On 10/5/11 2:58 PM, "Vincent Hardy" <vhardy@adobe.com<x-msg://25/vhardy@adobe.com>> wrote:

Hi Alan,

From: Alan Stearns <stearns@adobe.com<x-msg://25/stearns@adobe.com>>
Date: Wed, 5 Oct 2011 14:48:04 -0700
To: David Hyatt <hyatt@apple.com<x-msg://25/hyatt@apple.com>>, Adobe Systems <vhardy@adobe.com<x-msg://25/vhardy@adobe.com>>
Cc: "www-style@w3.org<x-msg://25/www-style@w3.org> list" <www-style@w3.org<x-msg://25/www-style@w3.org>>
Subject: Re: [css-regions] The region-overflow property

Vincent,

I don’t object to handling the properties this way – making them orthogonal is a better design. I still don’t think that a lot of the combinations are useful, though.

Is there a way of retaining the “clip in the pagination direction only” functionality Dave and I were discussing? If I have a flow whose content does not fit horizontally (or perpendicular to the pagination direction), I can’t get the “as if there was another region” display described below. I either have to use overflow:visible to get the horizontal overflow to display which gives me the vertical overflow as well, or use overflow:hidden to clip what would have gone into the next region and have the horizontal overflow get clipped too. Perhaps this is an edge case, but it’s the only combination of break and overflow that I’m really interested in.

To have the 'render as if there was another region behavior',  we would do:

#last-region {
    overflow: <what you want>
    region-overflow: break;
}

If overflow is 'visible', we would not see more of the flow (because there is a break, the remainder of the flow is not laid out by the last region). You would see the horizontal and vertical overflows (e.g., long, unbreakable lines or relative children). If overflow is 'hidden', then you get the normal clipping.

This would be the same rendering as if there was another region laying out what comes after the last break in the flow.

Cheers,
Vincent.


Alan

On 10/5/11 2:16 PM, "David Hyatt" <hyatt@apple.com<x-msg://25/hyatt@apple.com>> wrote:

Oh good. That was my initial interpretation. That's easy to change. In that case you definitely need pictures of region-overflow:break, overflow:visible as well as region-overflow:break, overflow:hidden to make that clear.

dave

On Oct 5, 2011, at 3:47 PM, Vincent Hardy wrote:

From: David Hyatt <hyatt@apple.com<x-msg://25/hyatt@apple.com>>
Date: Wed, 5 Oct 2011 13:12:39 -0700
To: Alan Stearns <stearns@adobe.com<x-msg://25/stearns@adobe.com>>
Cc: Adobe Systems <vhardy@adobe.com<x-msg://25/vhardy@adobe.com>>, "www-style@w3.org<x-msg://25/www-style@w3.org> list" <www-style@w3.org<x-msg://25/www-style@w3.org>>
Subject: Re: [css-regions] The region-overflow property

On Oct 5, 2011, at 2:47 PM, Alan Stearns wrote:

On 10/5/11 12:35 PM, "Vincent Hardy" <vhardy@adobe.com<x-msg://25/vhardy@adobe.com>> wrote:


 On Oct 4, 2011, at 2:30 PM, David Hyatt wrote:

On Oct 4, 2011, at 1:23 PM, David Hyatt wrote:

 http://dev.w3.org/csswg/css3-regions/#region-overflow

 It is ambiguous (to me at least) in section 4.4 whether
 region-overflow:break causes clipping to occur when content spills out of
 the last region. I am assuming the only thing it affects is pagination at
 the last region edge, and that clipping is always controlled by overflow.


 Actually upon re-reading this, it sounds like you do expect the content that
 paginates as a result of region-overflow:break to be into some unrendered
 space when region-overflow:break is specified. That seems like fine behavior
 to me, but it should probably be specified a bit more clearly in the text.



 Hi Dave,

 After reading the all thread where you said you are fine with the current
 spec. and this initial email, I will add an action for met to be a bit more
 specific about the expected behavior.

 Thanks,
 Vincent

 There's a green section at the end of 4.4 that says "The 'overflow' property
 is honored on a region..." Given the recent discussion I do not think this
 is correct. When you add more detail to region-overflow:break you'll
 probably need to remove the green section.

Note that in the WebKit implementation at least, I made region-overflow:break only clip in the pagination direction. overflow:visible is still honored for content that spills out of the sides of the region.

Actually, the green section reflects what I meant. I did not mean for the region-overflow to clip at all. Instead, it determines whether or not the flow content is broken at the end of the last region. The clipping introduced by the overflow property is orthogonal. So if, for example, we had a relatively positioned element on the last line of the flow content that fits in the last region and:

- overflow was set to visisble,
- region-overflow was set to break,
- with the relative positioning, the element overflows to the right and bottom

the element should be fully visible, despite its overflowing the region box.

The region break just gives the last region the same behavior as other (not last) regions. Another way to think about it: with region-overflow: break, the last region's rendering should be exactly the same as if there was an other pseudo-not-rendered-region to take some or all of the content that does not fit in the region.

Cheers,
Vincent

dave
(hyatt@apple.com<x-msg://25/hyatt@apple.com>)









<overflows.png>

Received on Wednesday, 5 October 2011 22:30:26 UTC