- From: fantasai via GitHub <sysbot+gh@w3.org>
- Date: Mon, 05 Sep 2016 17:39:02 +0000
- To: public-css-archive@w3.org
On 09/03/2016 01:49 PM, Daniel Holbert wrote:
> The css-align spec (the canonical definition for |align-self|)
> is pretty unequivocal about how to handle |align-self:auto|.
> Quoting:
>
> The |auto| keyword computes to the computed value of
> |align-items| on the parent or |normal| if the box has no
parent.
> https://drafts.csswg.org/css-align/#propdef-align-self
>
> But, the flexbox & grid specs attempt to define some special-case
> behavior for this |auto| value on absolutely-positioned elements --
> and IMO they're too vague about how/where that special case behavior
> is supposed to be triggered, and how broadly its effects spread.
>
> The language I'm concerned about is here in the flexbox spec:
>
> For this purpose, a value of |align-self: auto| is treated
> identically to |start|.
> https://drafts.csswg.org/css-flexbox-1/#abspos-items
>
> ...and here in the grid spec:
>
> For the purpose of calculating this static position, a value
> of |auto| for |align-self|/|justify-self| behaves as |start|.
> https://drafts.csswg.org/css-grid-1/#static-position
>
> Superficially, the phrase "a value of" is too vague. (Is that
> "a /specified/ value"? "a /computed/ value"? something in
> between?) And of course, "behaves as" is vague too.
IIRC we had backported this behavior in Flex and Grid from Align,
but maybe we screwed up somewhere afterwards. :/
The intention is that absolutely-positioned items never take their
parent's align/justify-items value because they are out-of-flow
and are positioned, often to an indirect ancestor. Honoring the
parent's *-items value is likely to cause confusion.
There's two ways to deal with this:
1.) 'auto' computes to 'normal' on the root and on abspos items,
and to the parent's *-items value on everything else
2.) 'auto' computes to itself always and we do the logic at
used-value time.
I don't think we have a strong opinion on this matter. Computing
through means getComputedStyle() returns a more accurate value;
otherwise it probably doesn't matter much.
~fantasai
--
GitHub Notification of comment by fantasai
Please view or discuss this issue at
https://github.com/w3c/csswg-drafts/issues/440#issuecomment-244791183
using your GitHub account
Received on Monday, 5 September 2016 17:39:09 UTC