W3C home > Mailing lists > Public > www-style@w3.org > July 2012

Re: [css3-flexbox] Paint flex items atomically?

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 4 Jul 2012 10:27:29 -0700
To: Morten Stenshorne <mstensho@opera.com>
Cc: www-style@w3.org
Message-ID: <20120704172729.GA11878@crum.dbaron.org>
On Thursday 2012-06-28 11:00 +0200, Morten Stenshorne wrote:
> Should flex items be treated as if they sort of establish a new stacking
> context (except for descendants that are positioned or create true
> stacking contexts on their own)? I'm talking about what
> http://www.w3.org/TR/CSS2/zindex.html has to say about inline-block,
> inline-table and floats.

I tend to think that they should be.  (And I think it's weird that
table cells don't do this as well, but they don't.)

As a brief reminder, this behavior exists to support implementing
the requirement in http://www.w3.org/TR/CSS21/visuren.html#floats
that:
  # A float can overlap other boxes in the normal flow (e.g., when a
  # normal flow box next to a float has negative margins). When this
  # happens, floats are rendered in front of non-positioned in-flow
  # blocks, but behind in-flow inlines. 
which in turn requires that all inlines in the block formatting
context be painted on top of all the blocks in that same block
formatting context.

I find it weird for this all-inlines on top of all-blocks behavior
to cross between block formatting contexts (as it does for table
cells, e.g., in
http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0A%23a%20div%20%7B%20background%3A%20aqua%3B%20color%3A%20blue%3B%20margin-right%3A%20-1em%20%7D%0A%23b%20div%20%7B%20background%3A%20yellow%3B%20color%3A%20brown%3B%20margin-left%3A%20-1em%20%7D%0A%3C%2Fstyle%3E%0A%3Ctable%3E%3Ctr%3E%0A%3Ctd%20id%3D%22a%22%3E%3Cdiv%3Ehello%3C%2Fdiv%3E%3C%2Ftd%3E%0A%3Ctd%20id%3D%22b%22%3E%3Cdiv%3Ehello%3C%2Fdiv%3E%3C%2Ftd%3E%0A%3C%2Ftr%3E%3C%2Ftable%3E
so I tend to think we should make flex items (which also, I presume,
establish new block formatting contexts -- I hope we say that
somewhere -- since having float overlap handling cross between flex
items would, I think, be crazy) establish a new one of these things
that's a little bit like a stacking context.

This email completes ACTION-482.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
Received on Wednesday, 4 July 2012 17:28:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:56 GMT