Skip to content

[css-values][css-backgrounds][css-animations][css-transitions][fill-stroke] How to handle linked list-valued properties? #7164

Open
@SebastianZ

Description

#4431 requests to turn box-shadow into a shorthand. During the discussion of this change @dbaron mentioned that there is a general issue in handling list-valued longhand properties.
According to him and @emilio dealing with such values is complicated as the properties can have differently long lists. And this seems especially true for background-* longhands.

As @tabatkins summarized it, they'd prefer if the computed value lists would be aligned with the used value lists, i.e. expanded or truncated depending on the length of the length-controlling property.

Having a deeper look at that, I realized that there are currently differences in handling such properties across browser engines but also within one browser engine. E.g. in Blink, the computed value list length of background-size is controlled by the length of the list in background-image, while transition-duration's computed value is not bound to the one of transition-property and rather corresponds to the authored value. In Gecko, all the values correspond to the authored value.

Looking at the specifications, they seem to only clearly define the used values but the computed value is underdefined. CSS Backgrounds 3 defines how different lengths of authored values are handled and mentions that "the UA must calculate its used value by repeating the list of values until there are enough" (emphasizing by me). It doesn't seem to specify how computed values are actually generated. CSS Animations 1 refers to this specification as well as CSS Transitions 1 does. There might also be more specifications for such list-valued properties that need clarification.

This issue is meant to clarify how such linked list-valued properties should be handled. Maybe the definition for this handling should be moved to a central place (maybe in CSS Values?).

Sebastian

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

        翻译: