-
Notifications
You must be signed in to change notification settings - Fork 184
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
Suggestions on css/syntaxes.json #8
Comments
I was never perfectly happy with the syntaxes construct but couldn't come up with a better solution, so, I'm happy you mention it now.
How do you imagine the automatic escaping to work? How should those variables be stored then?
Do you refer to the Note that the spec. information is currently still stored on MDN within the SpecName and spec2 templates, but will be moved to GitHub at some point, too. This will probably be done in bug 1280225.
Note that the values related to at-rules are also syntaxes, and are even shared among at-rules and properties in some cases. E.g.
I think I had to do that on MDN side for some reason. Need to investigate that again. After all, this issue should be split up, so its different parts can be tackled individually. Sebastian |
"cf-mixing-image": "<percentage>? && <image>", should be stored as: "cf-mixing-image": "<percentage>? && <image>",
Any additional information can be useful. Sometimes is too hard to find details about property or syntax - and no clue what it uses for.
I talk about syntaxes that use non CSS Values and Units Module grammar, in particular:
Well, dictionary already splitted into several files. So, I believe changes are possible ;) All you need is simple convertor...
Agree. I would like to discuss the opportunity before creating issues for specific tasks. |
There are multiple suggestions in this issue, and I want to mention that I also would like to avoid HTML entities in the JSON. ( |
@Elchi3 Done! 👌 |
Thanks for all these suggestions! I think we can continue in the separated issues. |
Currently
css/syntaxes.json
contains various types of syntaxes. Most of them are for values, rest are for at-rules and others. I believe those syntaxes should be stored in diferent dictionaries or have a special marker, since those syntaxes using diferrent grammar.As we know this data was originally used on MDN. That's why some symbols like
<
,>
,&
and others were escaped (for safety inject to HTML documents I guess). Some syntaxes has<var>
in their definition. It's verbose and doesn't need in non-HTML context. Mostly it can be automatically excaped when needed.Probably format should be extended to store additional infomation about syntax as reference to spec, standart or not, etc.
Suggestions:
css/syntaxes.json
into values syntaxes and something else (or move it to appropriate dictionary, e.g. tocss/at-rules.json
), or just remove non-value syntaxes awayThe text was updated successfully, but these errors were encountered: