corset icon indicating copy to clipboard operation
corset copied to clipboard

Support unordered shorthand

Open matthewp opened this issue 2 years ago • 0 comments

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 avatar Oct 07 '22 11:10 matthewp