Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-properties-values-api] Multiple names in @property rule #6912

Closed
valtlai opened this issue Dec 25, 2021 · 1 comment
Closed

[css-properties-values-api] Multiple names in @property rule #6912

valtlai opened this issue Dec 25, 2021 · 1 comment

Comments

@valtlai
Copy link
Contributor

valtlai commented Dec 25, 2021

Spec: https://drafts.css-houdini.org/css-properties-values-api-1/#at-property-rule

Allowing multiple custom property names in the @property rule would simplify, or make more DRY, cases where multiple very similar properties are defined:

@property <custom-property-name># {
  <declaration-list>
}

For example, the following (where --x, --y, and --z represent some coordinates):

@property --x {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

@property --y {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

@property --z {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

could be rewritten into:

@property --x, --y, --z {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}
@SebastianZ
Copy link
Contributor

This is already requested in w3c/css-houdini-drafts#1058 and it looks like there's already agreement in adding it.

Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants