[csswg-drafts] [css-text-3] 'match-parent' computed value

prjnt has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-text-3] 'match-parent' computed value ==
(Refs to ED text: https://drafts.csswg.org/css-text-3/#text-align-property , https://drafts.csswg.org/css-text-3/#text-align-all-property .)

'text-align' is described as being a shorthand that "sets the text-align-all and text-align-last properties", but it isn't described what the text-align-all property is set to.  If text-align sets text-align-all to the same specified value, then the specifications of their computed values would conflict, in the case of 'match-parent': text-align-all says simply "as specified", while text-align says that match-parent computes to either the parent computed value or 'left' or 'right'.

(I'd guess that text-align-all should have behaviour similar to that currently described for text-align, or indeed for the description to be moved from 'text-align' to 'text-align-all'; though this might depend on how the below issues are resolved.)

In the case of 'text-align', this description refers to "its parent’s computed value", but shorthand properties do not have computed values.  I suppose that keeping the canonical description with 'text-align' is an
attempt to shield authors from having to think of the underlying longhands.  How far should that be taken?  If 'match-parent' "behaves the same as 'inherit' [except start or end]", then should that include the case that the parent has ‘text-align: justify-all’ ?  If so, then the specification of how 'text-align' sets the specified value of 'text-align-last' will need changing.

When referring to "parent’s direction value", the root case should be mentioned explicitly.

(I think I'd do this as a separate sentence, perhaps "(A specified value of 'match-parent' on the root element is calculated according to the initial values of ..., resulting in [the equivalent of ‘text-align: left’].)"; where the exact wording would depend on whether the description is under 'text-align' or 'text-align-all', and the rule for how text-align:match-parent sets text-align-last.)

It might well be simpler to take the more usual approach that the specification of a shorthand mostly defer to behaviour of individual longhand properties, other than specifying the shorthand's syntax and the rules for how component longhand properties get set.

Sections 7.4.1 and 9.3 still refer to the value of text-align, as if text-align were a property.  (For 7.4.1, "text-align properties" might work.)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2577 using your GitHub account

Received on Monday, 16 April 2018 06:54:40 UTC