Skip to content

[css-properties-values-api] Substituting registered properties with var() #321

@tim-loh

Description

@tim-loh

Are registered properties substituted as lists of tokens as per css-variables or as some sort of parsed representation? There are some cases where values can be parsed as different types so this affects whether the end value parses successfully, e.g.

--number: 0; height: var(--number);
--color: green; animation-name: var(--color);
--length-list: 5px 10px 20px; box-shadow: green var(--length-list);
--url: url(a.png); background-image: var(--url); /* <image> values can be <url> values so this should be valid */

For the last case, if the declarations are in separate files, do we resolve <url>/<image> types with a base URL from the sheet with variable declaration or the usage thereof? When these are not registered, it seems that we should use the "background-image" sheet (crbug.com/618165#c11) but doing this for a registered custom property means the custom property has a different computed value to where it's used.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions