RE: [css3-backgrounds] Should a non-zero border-radius create a new stacking context ?

I know that it doesn't and it was not my intent to imply that they were related. I happen to find the result to be more a testcase than a use-case - weird in other words - regardless of the presence or absence of a curve. But the presence of a curve does complicate implementation: clipping the element at the higher z-index due to the invisible border edge of its parent requires more work with this kind of geometry vs. a rectangular shape. Using the kind of composition capabilities available on modern platforms  - as done with opacity and transform effects - would make the job easier.

It may be argued that what is helpful to implementors may be less so to authors. When the suggestion was first made on our end I was not comfortable with messing z-ordering as soon as border-radius is positive as that seemed arbitrary and dangerous; but given that we have specified that z-ordering can change on :hover due to opacity or a subtle transforms and as authors do just that I'm not so sure this concern is warranted in practice. 

I also note that we're heading into CR and most browsers will fail the testcases for this part of the spec. So it would seem appropriate to inquire as to why as well as whether and how we may simplify the model for implementors and authors alike. My suggestion relates to the latter part and is limited to this particular effect; I cannot speculate about the former. Finally, changing the CSS overflow model is not within the scope of this specification so that is not my intent either...and even if we wanted to, I don't think Background & Borders should stay in CR until we've agreed on how.
  
________________________________________
From: fantasai [fantasai.lists@inkedblade.net]
Sent: Saturday, November 20, 2010 8:42 AM
To: Sylvain Galineau
Cc: Brad Kemper; www-style@w3.org
Subject: Re: [css3-backgrounds] Should a non-zero border-radius create a new  stacking context ?

On 11/20/2010 08:25 AM, Sylvain Galineau wrote:
> I never said it shouldn't clip to the inner corner curve. That's not at all the point. If the element with border-radius in my
> original testcase created a new stacking context then the blue box moves below the green one (as it also will if you give the
> parent opacity < 1, or a transform). It still must clip to the parent's curve within that parent's stacking context.
>
> So no one is questioning whether the element should clip to the border curve. The suggestion is that the non-zero radius would
> result in a different z-order for the blue box.

What Brad is saying is that the problem you're running into wrt stacking
contexts has nothing to do with whether the border is curved or square.
(Give the element some negative margins, and you'll get the same behavior
with a square border.)

Having non-zero border radius affect the z-order doesn't follow from the
problem you describe: it's not creating any new or interesting stacking
effects. It's just changing the shape of the clip mask.

~fantasai


Received on Saturday, 20 November 2010 19:11:38 UTC