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

Support unordered shorthand #183

Open
matthewp opened this issue Oct 7, 2022 · 0 comments
Open

Support unordered shorthand #183

matthewp opened this issue Oct 7, 2022 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@matthewp
Copy link
Owner

matthewp commented Oct 7, 2022

In CSS shorthand can be unordered: https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties#ordering_properties

In Corset ordering is strictly enforced. This makes it harder to use properties like event which has a very long signature. It would be nice if you could do:

body {
  event: var(--target) onpopstate var(--callback);
}

I think the algorithm would go something like this:

  1. Check if the value is of the right type
  • Probably the type would be part of the longhand prop declaration.
  1. If not, start at the first unfulfilled property until you find one of the right type.
@matthewp matthewp added the enhancement New feature or request label Oct 7, 2022
@matthewp matthewp added this to the Next milestone Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant