-
Notifications
You must be signed in to change notification settings - Fork 145
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
Rule::listDelimiterForRule
needs to return different order for many properties
#791
Comments
The method was introduced in 9ed24ad. |
Related: w3c/csswg-drafts#7218 |
From the references, |
Rule::listDelimiterForRule
needs to return different order for many properties
I think we introduced it because we wanted to parse |
Yes, that occurred to me after I wrote the above. Thinking about various properties, and reviewing the docs on MDN, it seems to me that the best general case would be ['/', ' ', ','] I.e. most values are first separated by commas, then by spaces, then somtimes by slashes. I can't think of any exceptions to this, though that doesn't mean there aren't any. In the case of For the next major release, I would suggest simply using the above separator precedence for all cases. We are allowed to make potentially breaking changes in a major release, but I think doing so would fix more issues than it creates. We can then special-case certain properties that may need a differerent ordering. There are many that need separation by commas first. @sabberworm, @oliverklee WDYT? |
Actually, I can: a list of typefaces can be provided, and to complicate matters futher, the names may contain spaces and don't need to be enclosed in quotes even if they do. E.g. I think |
Continuing from #789.
The above-mentioned method is only currently special-casing font properties and the fix for the above.
Many properties' values are comma-separated before being space-separated. It might be better to make that the default, then special-case the others. But doing so risks a breaking change. I don't know which properties use
/
as a separator. I can't think of any, but there must be some, otherwise it wouldn't be there.Things like
box-shadow
will not currently be parsed correctly into the expected object structure, though will still render back out OK.The text was updated successfully, but these errors were encountered: