[css-align] Clarification on the concept of 'parent' for Self Alignment 'auto' value resolution

hi,

Sorry if this question is seen as a pure implementation detail, but I'm
finding some problems to properly implement 'auto' value resolution in
some cases. Both the Flexbox and Box Alignment specification use the
concept "element's parent" to indicate the Default Alignment
value to be used for resolving 'auto' values of children's Self
Alignment properties.

>From the Flexible Box spec:

"On absolutely positioned elements, a value of auto computes to itself.
On all other elements, a value of auto for align-self computes to the
value of align-items on the element’s parent, or stretch if the element
has no parent."
https://drafts.csswg.org/css-flexbox/#align-items-property

>From the Box Alignment spec:

"The auto keyword computes to the computed value of justify-items on the
parent (minus any legacy keywords), or normal if the box has no parent."
https://drafts.csswg.org/css-align/#align-self-property

It may seems like obvious, but, I'd like a direct clarification of what
"parent" means here. Is it the HTML element's parent or the "parent box"
generated when elements are laid out ?

My question comes from the fact that some layout models may add an
anonymous box
as parent for elements with 'auto' values in their Self Alignment
properties. There won't
be a direct CSS rule indicating the Default Alignment value these 'auto'
 values will be resolved against. It'd depend on the values set, at
layout time, to those anonymous
parents.

BR,

----
Javi

Received on Monday, 30 May 2016 12:28:39 UTC