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

[css3-flexbox] Computed value of "flex-item-align:auto" on the root node

From: Daniel Holbert <dholbert@mozilla.com>
Date: Mon, 30 Apr 2012 15:01:08 -0700
Message-ID: <4F9F0BA4.30900@mozilla.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Hi Tab,

Right now, the computed value of "flex-item-align:auto" is undefined on
any node that lacks a parent. (e.g. the root node)

The flex-item-align chunk of the spec makes the implicit assumption that
there is a parent, in two different places:
  # Computed Value:
  #  ‘auto’ computes to parent's ‘flex-align’; otherwise
  #   as specified
  # [...]
  # A value of ‘auto’ for ‘flex-item-align’ computes to
  # the value of ‘flex-align’ on the flexbox item's flexbox.


I see two ways to handle this situation:
(a) if there's no parent, 'auto' computes to 'stretch'
      (the default flex-align value)
(b) if there's no parent, 'auto' just computes to 'auto'

I'd strongly prefer (a), because it means that 'auto' could then be a
specified-value-only keyword (like 'initial' / 'inherit') and it'd never
have to be handled as a possibility in the computed style.

Received on Monday, 30 April 2012 22:01:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:15 UTC