Skip to content

[css-properties-values-api] @property descriptors should be optional whenever possible #1162

@Crissov

Description

@Crissov

@property rules require a syntax and inherits descriptor;
if either are missing, the entire rule is invalid and must be ignored.

This requirement seems very unlike any other declaration list in CSS.

@property --partial { }
@property --partial { syntax: "*"; }
@property --partial { syntax: "<length>"; }
@property --partial { inherits: true; }

should be equivalent to

@property --partial {
  syntax: "<length>";
  inherits: true;
}

The initial-value descriptor is optional only if the syntax is the universal syntax definition,
otherwise the descriptor is required;
if it’s missing, the entire rule is invalid and must be ignored.

Particularly with multiple custom property names per #1058, which will frequently just differ in initial-value, these requirements combined would still lead to needless repetitions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions