Skip to content
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

Adding "Formal Definition" heading above cssinfo #3363

Merged
merged 2 commits into from
Jun 9, 2021

Conversation

butterydev
Copy link
Contributor

This PR adds a "Formal Definition" heading above cssinfo in the margin web/css doc.

I noticed this heading on other property docs and it appeared to be missing here.

Let me know if this is buttery or not.

Love MDN!!! Thanks!!!

Checklist — To help your pull request get merged faster, please do the following:

    • Provide a summary of your changes — say what problem you are fixing, what files are changed, and what you've done. This doesn't need to be hugely detailed, as we can see exact changes in the "Files changed" tab.
    • Provide a link to the issue(s) you are fixing, if appropriate, in the form "Fixes url-of-issue". GitHub will render this in the form "Fixes fix: fixable flaws in Glossary A-D entries #1234", with the issue number linked to the issue. Doing this allows us to figure out what issues you are fixing, as well as helping to automate things (for example the issue will be closed once the PR that fixed it has been merged).
    • Review the results of the automated checking we run on every PR and fix any problems reported (see the list of checks near the bottom of the PR page). If you need help, please ask in a comment!
    • Link to any other resources that you think might be useful in reviewing your PR.

This PR adds a "Formal Definition" heading above cssinfo in the margin web/css doc.

I noticed this heading on other property docs and it appeared to be missing here.

Let me know if this is buttery or not.

Love MDN!!! Thanks!!!
@butterydev butterydev requested a review from a team as a code owner March 22, 2021 12:04
@butterydev butterydev requested review from mirunacurtean and removed request for a team March 22, 2021 12:04
Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ideally CSS properties should have a top-level heading structure like:

H2 - Constituent properties (if a shorthand)
H2 - Syntax
H2 - Description (optional)
H2 - Formal definition (contains {{cssinfo}})
H2 - Formal syntax (contains {{csssyntax}})
H2 - Examples
H2 - Specifications
H2 - Browser compatibility
H2 - See also

See https://developer.mozilla.org/en-US/docs/Web/CSS/border-color or https://developer.mozilla.org/en-US/docs/Web/CSS/flex#description for an example shorthand property, and https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip for an example not-shorthand property.

So to be really buttery, this should:

  • add an H2#Constituent properties, before the H2#Syntax. This should list the properties for which margin is a shorthand. This can use the same wording as in, say, https://developer.mozilla.org/en-US/docs/Web/CSS/border-color#constituent_properties, and means we no longer need the second sentence "It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left.".

  • rename H2#Notes to Description, and move it to after H2#Syntax

  • add H2#Formal definition, after the new H2#Description, and put the {{cssinfo}} call after it.

  • move the existing H3#Formal syntax to be an H2 and to follow after the H2#Formal definition. Put the {{csssyntax}} call after it.

Does that make sense?

@butterydev
Copy link
Contributor Author

@wbamberg totally makes sense!!! thank you so much!!! ill get those updates!!!

thanks again!!!

@rachelandrew
Copy link
Collaborator

@butterydev were you going to come back to this?

@sideshowbarker
Copy link
Member

@butterydev Per #3363 (comment) this PR seems to be waiting on further changes from you.

@wbamberg wbamberg dismissed their stale review June 9, 2021 04:02

I've applied the requested changes myself

@wbamberg
Copy link
Collaborator

wbamberg commented Jun 9, 2021

I wanted to close this, so pushed some changes along the lines suggested in #3363 (review) .

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2021

Preview URLs

Flaws

None! 🎉

External URLs

URL: /en-US/docs/Web/CSS/margin
Title: margin
on GitHub

No new external URLs

Copy link
Collaborator

@rachelandrew rachelandrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm :)

@rachelandrew rachelandrew merged commit 0f586b5 into mdn:main Jun 9, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants