Re: [csswg-drafts] [css-flexbox] Absolute Positioned Elements in Flex Containers Removes Common Layout Patterns

The general reason I'd advocate for this change is that it is 
important `left: auto;` and `top: auto` behave consistently 
*regardless of parent container* so that component authors can write 
generic code that "just works" without having to know where it is 
placed.

The argument for the utility of absolutely positioned elements placed 
with `auto` position is a bit broad, but I'll go ahead and make the 
case for times I'd use this pattern

Elements might need  `absolute` and `top/left:auto` when 

* Element needs to be positioned "in layout", aka respective to its 
position in normal content flow but not affect content position. (Most
 often these are decorators like layered backgrounds, dividers, 
bevels, etc)

Some reasons for needing this pattern:

Element
* Is positioned relative to the parent element's `padding` 
* Is positioned relative to a sibling element's margin
* Should shift in position with line breaks in inline block or floated
 items
* Should position differently based on `text-align` or `align-items`
* Other elements use exact percentages in a non-flex container, i.e. 3
 column (33.33%) and element width is fixed (i.e. specified in px)
* Needs to overlap preceding/previous content without affecting its 
position
* Needs to be represented as a percentage of its parent containers 
size
* Need to be animated as a separate layer which should not cause the 
surrounding content to jump in position between `display: none` and 
visible

-- 
GitHub Notification of comment by jlukic
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/401#issuecomment-281403728 
using your GitHub account

Received on Tuesday, 21 February 2017 16:51:13 UTC