Skip to content

[css-properties-and-values] Setting/registering is allowed to be order-dependent #354

Closed
@tabatkins

Description

@tabatkins

Per Seattle resolution (resolution is badly worded, read up to figure out what was actually being discussed), we're OK with an order-dependence between setting a value and registering a value.

That is, we want the following behavior:

CSS.registerProperty("--foo", { grammar: "<color>" });
el.styleMap.set("--foo", "red");
el.styleMap.set("--foo", "hello"); // throws an error
// --foo is still set to "red"

and

el.styleMap.set("--foo", "red");
el.styleMap.set("--foo", "hello"); // valid at this point; --foo is untyped
CSS.registerProperty("--foo", { grammar: "<color>" }); // valid
// because --foo was set to a non-<color> value,
// it's now set to "unset", the bottom value for properties

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