- From: Robert O'Callahan <robert@ocallahan.org>
- Date: Tue, 21 Aug 2012 00:06:11 +1200
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: Dirk Schulze <dschulze@adobe.com>, www-style list <www-style@w3.org>
- Message-ID: <CAOp6jLaXhJMus5gtyY73vO0VjOM5uPDg+RO=P18aOSvCSoFs-w@mail.gmail.com>
On Mon, Aug 20, 2012 at 8:13 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote: > On Sun, Aug 19, 2012 at 9:42 AM, Dirk Schulze <dschulze@adobe.com> wrote: > > I wonder if it is possible to extend the 'clip' property to apply to all > elements (instead of just absolute positioned elements) [1]? FF applies > 'clip-path'[2] to all elements already. What are the concerns to do so on > 'clip'? > > > > Can we extend 'clip' to use more shapes then just 'rect'? If we get rid > of these limitations, the 'clip' property would be a lot more useful (or > maybe useful for the first time? ;) ). The basic shapes 'circle', 'ellipse' > and 'polygon' (but also 'rectangle') from the exclusion spec [3] seem to be > good candidates. > > Yes, we can and we should (imo). I'm not sure why 'clip' is restricted > just to abspos per spec; I assume it's to avoid possible confusion > because it doesn't change the geometry of the object. > I don't have a good reason to make 'clip' more generally applicable, but it's possible that copy-paste Web content applies 'clip' to non-abs-pos content and breaks if you make that work. (For the same reason I'm wary of making z-index apply to non-positioned elements, even though I'd really like to.) > 'clip-path' could still be used for referencing SVG 'clipPath' elements > or could shadow 'clip' and 'clip' supports a <FuncIRI> as well. > > We've finally stumbled on a decent way to handle aliasing - > 'clip-path' can be treated as a shorthand for 'clip', and we can add > url()/select() to 'clip' in addition to the shape functions. > We made clip-path induce a stacking context on the element. As usual, this made implementation a lot easier. Making 'clip' handle arbitrary shapes, while not inducing a stacking context, would be a real pain to implement (although we could do it). Making 'clip' induce a stacking context would pose its own Web compatibility hazard. If some browser vendors wants to do those Web compatibility experiments, please go ahead. I'm a bit fatigued by break-the-Web experiments at the moment :-). Rob -- “You have heard that it was said, ‘Love your neighbor and hate your enemy.’ But I tell you, love your enemies and pray for those who persecute you, that you may be children of your Father in heaven. ... If you love those who love you, what reward will you get? Are not even the tax collectors doing that? And if you greet only your own people, what are you doing more than others?" [Matthew 5:43-47]
Received on Monday, 20 August 2012 12:06:40 UTC