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

Remove slashes from void elements #2630

Closed
wants to merge 1 commit into from
Closed

Conversation

bennypowers
Copy link

https://html.spec.whatwg.org/multipage/syntax.html#start-tags

Description

Removed slashes from void <co.> elements on the col element page example

Motivation

The spec discourages use of slash:

Additional details

On void elements, [a slash] does not mark the start tag as self-closing but instead is unnecessary and has no effect of any kind. For such void elements, it should be used only with caution — especially since, if directly preceded by an unquoted attribute value, it becomes part of the attribute value rather than being discarded by the parser.

(emphasis mine)

@bennypowers bennypowers requested a review from a team as a code owner October 11, 2023 06:07
@bennypowers bennypowers requested review from dipikabh and removed request for a team October 11, 2023 06:07
@github-actions
Copy link

It looks like this is your first pull request. 🎉 Thank you for your contribution! One of the project maintainers will triage and assign the pull request for review. We appreciate your patience. To safeguard the health of the project, please take a moment to read our code of conduct.

@dipikabh dipikabh self-assigned this Oct 19, 2023
Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

Thanks for providing this fix @bennypowers!

We've documented the same guidelines for void elements on MDN. 🙂 (glossary entry)

@dipikabh
Copy link
Contributor

Please excuse my previous approval. I looked into the lint errors flagged here - prettier is adding back the slashes that were removed.

Please see this thread https://github.com/orgs/mdn/discussions/242, which captures the discussion and the decision to keep using Prettier and accepting its behavior. This is why we cannot accept the changes and will have to close this PR.

We appreciate your effort to keep MDN accurate. Thank you!

@dipikabh dipikabh closed this Oct 19, 2023
@bennypowers
Copy link
Author

It's a sad condemnation of the state of the art that the once-proud MDN has capitulated to javascript-tooling's arbitrary opinions, which run counter to both the specifications and your own guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants