- From: Simon Sapin <simon.sapin@kozea.fr>
- Date: Tue, 21 Aug 2012 14:18:22 +0200
- To: www-style@w3.org
Le 21/08/2012 13:22, Robert O'Callahan a écrit : > I think that a rectangle is not easier. But currently 'clip' is > limited to abspos elements which already create a stacking context. > > > Abs-pos does not create stacking contexts, though. Positioned elements with a z-index value other than 'auto' create a stacking context. Appendix G: > For those with 'z-index: auto', treat the element as if it created a > new stacking context, but any positioned descendants and descendants > which actually create a new stacking context should be considered > part of the parent stacking context, not this new one. "as if it created a stacking context" is the same as a "real" stacking context for the ease of implementing clip. In both cases, the E.2 algorithm is used recursively, which gives a nice place to do or undo the clipping. Overflow however is not so nice. To implement it correctly (without it creating stacking context) you have to keep track of all overflow values in the ancestry every time the algorithm says "For all [...] descendants". Changing this has been discussed here, though with no outcome: http://lists.w3.org/Archives/Public/www-style/2009Feb/0131.html http://lists.w3.org/Archives/Public/www-style/2012May/0442.html To sum up: 'clip' as it stands is "easy" to implement in a conforming way, but 'oveflow' is harder. Allowing clip on any element (not just abs-pos) would make it as hard as overflow, unless it also creates a stacking context. In my opinion all of overflow, clip and clip-patch should create stacking contexts. -- Simon Sapin
Received on Tuesday, 21 August 2012 12:18:47 UTC