Skip to content

[css-syntax-3] Allow positioned {}-block in @property/initial-value #11737

Description

@cdoublev

Per spec, a positioned {}-block is allowed for a custom property, but not for @property/initial-value:

  1. [...] Otherwise, if decl’s value contains a top-level simple block with an associated token of <{-token>, and also contains any other non-<whitespace-token> value, return nothing. (That is, a top-level {}-block is only allowed as the entire value of a non-custom property.)

A possible solution could be to apply this only "if decls name is a supported CSS property".

However, I think the intention of step 9 is to allow reparsing a:hover {} / avoid reparsing --custom: var(1) {}, as a qualified rule. But it indifferently returns "nothing". So it could return an "invalid declaration error" instead. Consume a block's contents would also need to be updated accordingly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions