-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
,? not ?, #28872
,? not ?, #28872
Conversation
Preview URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not that familiar with the SVG doc conventions (and I guess at this point noone is) but:
- I think the syntax here is the same as the CSS formal syntax, that we have in places like https://developer.mozilla.org/en-US/docs/Web/CSS/font#formal_syntax and that we document at https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax
- AFAICT your PR here is good
I don't know why we repeat the syntax 5 times, once for every element that can use the attribute. But like I say, not an expert on the SVG docs conventions. Really the SVG docs need a huge amount of work to get them up to scratch :(.
So you're saying that the |
Yes.
Formal syntax is documented at https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax. The formal syntax in CSS property &c pages uses tooltips to give a quick summary of the syntax, and the syntax also links to the relevant bit of https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax. For example, https://developer.mozilla.org/en-US/docs/Web/css/font#formal_syntax includes
They are sometimes long and complicated to parse, but IMO it is worth learning the basics, as they give you a very precise explanation of CSS syntax. |
That's why I asked. Thanks! |
These changes reflect the way the spec does it here, at the very top of this section: https://svgwg.org/svg2-draft/coords.html#ViewBoxAttribute
[<min-x>,? <min-y>,? <width>,? <height>]
I assume that this docs page is intending to imitate the spec on this, but I am not even certain what the
?
means. I think it means that these arguments are optional, thus thatviewBox
requires only one argument. I am submitting this PR largely because I want to find out for certain what the?
means here and in the spec. I don't see any glossary that explains it anywhere. Maybe you can point me to one.