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

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.

http://dev.w3.org/csswg/css3-flexbox/#flex-item-align

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.

~Daniel

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