W3C home > Mailing lists > Public > www-style@w3.org > April 2015

Re: [css-align] Definition of align-self inconsistent with css-flexbox for abspos

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 9 Apr 2015 16:30:36 -0700
Message-ID: <CAAWBYDDmQS6LnTZ111u7wLJXBKrm_iFkbFc9bw776wUBxBjgsg@mail.gmail.com>
To: Christian Biesinger <cbiesinger@google.com>
Cc: www-style list <www-style@w3.org>
On Thu, Apr 9, 2015 at 11:41 AM, Christian Biesinger
<cbiesinger@google.com> wrote:
> Hi there,
>
> in reading http://dev.w3.org/csswg/css-align/#align-self-property I
> noticed a discrepancy from flexbox for this property.
>
> It says:
> "The auto keyword is equivalent to start on replaced
> absolutely-positioned boxes, and equivalent to stretch on all other
> absolutely-positioned boxes. (This is because CSS 2.1 does not stretch
> replaced elements to fit into fixed offsets.)"
>
> However, in flexbox we have:
> http://dev.w3.org/csswg/css-flexbox/#propdef-align-self
> "Computed value:auto computes to parent’s align-items value; otherwise
> as specified"
>
> This should be made consistent, probably by changing css-align to have
> an exception for flex/grid containers.

Flexbox precedes Align; Align supercedes Flexbox.  Sorry this isn't
clearer yet; as soon as Align is stable enough we'll remove the
definitions from Flexbox entirely (probably leaving the examples?).

The Alignment spec has special behavior for "auto" on absposes; for
all other boxes, it's identical to the Flexbox definition.

> Separately, the prose in css-align never does specify what the
> *computed* value is for auto. It says what auto is equivalent to, but
> is not clear on whether that affects the computed value or not.

The computed value is "auto"; that's defined earlier in the section.
The auto value just acts differently for replaced elements vs
non-replaced.  (This can't affect computed value, unfortunately,
because you don't know if something is replaced at computed-value
time.  It can depend on network behavior in the case of <img>, which
we don't allow computed values to depend on.)

~TJ
Received on Thursday, 9 April 2015 23:31:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC