-
Notifications
You must be signed in to change notification settings - Fork 22.7k
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 pages missing formal syntax #18780
Comments
@sideshowbarker hi, this requires over 10,000 changes and it is time-consuming for me. |
There probably isn't that many issues. The search is also returning pages that just mention those words. There is no possibility to search with the exact phrase. For what it's worth, I'd guess it would be okay to fix just some pages in same time and do multiple PRs. Makes it easier to review. |
Can we wait before trying to solve this issue? @wbamberg will know what the best course of action is. |
Ok. |
For CSS functions, we should update the CSSSyntax macro so it can find the formal syntax for those. From a quick look I think this is a really simple change, but I'm not sure whether it would be better to add it to mdn/yari#6618 or to wait for that to be merged, so as to keep PRs simpler and more focused. For nonstandard things like https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius it's a bit trickier because the syntax doesn't exist in webref. So we could either hardcode formal syntax in the pages, or remove the syntax. |
@wbamberg Hi,
|
I've filed mdn/mdn-community#175 to decide how to proceed wrt nonstandard properties. @najmiehsa , I think it would be best to wait until we have a resolution there. |
I've taken a look at this, made a sheet listing all the pages under CSS that have the error message "Error: could not find syntax for this item": https://docs.google.com/spreadsheets/d/1tNRrwtG_Kx2JWROeTQhqVGKoJQxfHHxp8on0OtQXp9g/edit#gid=0 . They seem to fall into three main categories: |
Thanks, @wbamberg I continue with the google doc list and the second list mentioned here #18780 (comment) |
Thank you @najmiehsa , that would be great! You should be able to find the syntax in https://github.com/mdn/data/blob/main/css/properties.json , and just copy it into a Markdown
If you want to start with just one, to get the general idea, then do the rest, that might be a good plan. |
Syntax not in webrefThis includes the following syntaxes that aren't given in webref: https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/repeating-conic-gradient The The
We can't just extract the prose description because of translated content. We could I suppose omit csssyntax here and just add some prose along these lines. Note that there are other cases like this, such as Finally I think there are a couple of things here.
|
It should, see w3c/webref#681 for how to fix it (I was waiting for an answer from @fred-wang to know if he wanted to do it or not) |
#19473 (comment) I am a bit confused about how to do this properly. I need to review this issue again. |
Custom CSS propertyI forgot, there is one left over: https://developer.mozilla.org/en-US/docs/Web/CSS/--_star_ . I'm not sure this should be a CSS property page at all. It isn't describing a specific CSS property, it's describing the syntax for a CSS feature (custom properties). |
@teoli2003 Sorry I forgot about that issue. I plan to take a look indeed. |
@wbamberg hi,
8/15, 8/22 updated the docs in this PR #19067 I added syntax for these properties:
8/20 I updated this PR #19416 . I covered:
These are the instances that I have not covered and pointed out the reason in front of it:
And 15 CSS functions at the end of the docs |
We're trying to avoid maintaining formal syntax in webref that does not exist in the specs but if it's only for the {
"<repeating-linear-gradient()>": {
"value": "<linear-gradient()>"
},
"<repeating-radial-gradient()>": {
"value": "<radial-gradient()>"
},
"<repeating-conic-gradient()>": {
"value": "<conic-gradient()>"
}
} That may not be fantastic for MDN though as you might prefer to see the expansion of the non-repeating functions? For other cases where Webref currently has prose because there is no formal syntax, I'm not sure there is much we can do at the Webref level. One possible improvement could be to extract HTML extracts from the spec instead of raw text, as this may be more directly reusable in MDN?
Both
... but rather
Why is that? I don't know :) You may want to ask the CSS working group why they sometimes decide to create functions and sometimes decide to leave them as pure textual syntax. It may not be intentional. I would prefer to only list functions in Webref that are defined as functions in CSS specs. We could complete the extracts with additional values though (provided we also extract the context under which these values are allowed, see w3c/reffy#980) |
Thanks for your reply, @tidoust , and sorry to be late responding. It seems like @fred-wang is going to take care of the MathML ones. Regarding
Yes, I can understand that for sure! We could just use some prose in these three cases instead of the syntax.
This should work fine, because we'd find (e.g.)
I'll see what they say :). Thanks again. |
I see that https://developer.mozilla.org/en-US/docs/Web/CSS/math-style is now rendered correctly and that #21092 landed recently. Anything else that should be done to make |
@fred-wang , #21092 ought to fix all three of those pages, and seems to, but please let me know if it doesn't :). |
I do not think they are valid definitions because repeating and non-repeating function names do not match. But there may be an intent to define |
MDN URL
https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient
What specific section or headline is this issue about?
https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient#formal_syntax
What information was incorrect, unhelpful, or incomplete?
Formal syntax
Error: could not find syntax for this item
What did you expect to see?
The formal syntax :-)
Do you have any supporting links, references, or citations?
https://www.w3.org/TR/css-images-3/#linear-gradients
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/css/gradient/linear-gradient
The text was updated successfully, but these errors were encountered: