Use page type instead of tags for CSSSyntax macro #7290
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Use page-type instead of tags for the CSSSyntax macro.
We recently defined and added page types for pages under Web/CSS: mdn/content#15540 .
One of the purposes of this was to replace tags for describing the type of thing a page documented. @teoli2003 observed that it would be a good idea to start using page types as soon as possible, as this gives us an incentive to keep them maintained.
So this PR updates the CSSSyntax macro to use page types instead of tags.
Screenshots
UI should look exactly the same, except in places where tags and page-type don't agree, in which case page-type should be more accurate.
How did you test this change?
Ran yarn dev, looked at some Web/CSS pages. Really what we are testing is that the macro can figure out how to get the formal syntax from webref for each of the four kinds of thing: CSS shorthand properties, CSS properties, CSS types, CSS functions.
Shorthand properties
http://localhost:3000/en-US/docs/Web/CSS/border#formal_syntax
http://localhost:3000/en-US/docs/Web/CSS/grid#formal_syntax
Properties
http://localhost:3000/en-US/docs/Web/CSS/justify-content#formal_syntax
http://localhost:3000/en-US/docs/Web/CSS/margin-top#formal_syntax
http://localhost:3000/en-US/docs/Web/CSS/mask-clip#formal_syntax
http://localhost:3000/en-US/docs/Web/CSS/opacity#formal_syntax
Types
http://localhost:3000/en-US/docs/Web/CSS/color_value#formal_syntax
http://localhost:3000/en-US/docs/Web/CSS/gradient#formal_syntax
Functions
http://localhost:3000/en-US/docs/Web/CSS/clamp#formal_syntax
http://localhost:3000/en-US/docs/Web/CSS/min#formal_syntax
http://localhost:3000/en-US/docs/Web/CSS/max#formal_syntax
http://localhost:3000/en-US/docs/Web/CSS/transform-function/translateY#formal_syntax