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

Removing self-closing tag #744

Merged
merged 2 commits into from
Dec 19, 2023
Merged

Removing self-closing tag #744

merged 2 commits into from
Dec 19, 2023

Conversation

ThomasLandauer
Copy link
Contributor

No description provided.

@rupasix
Copy link

rupasix commented Dec 19, 2023

AFAIK, both cases, before and after that change, are not valid HTML. SPAN is not void element. https://developer.mozilla.org/en-US/docs/Glossary/Void_element

@ThomasLandauer
Copy link
Contributor Author

https://validator.w3.org/nu/ says:

Warning: Self-closing tag syntax in text/html documents is widely discouraged; it’s unnecessary and interacts badly with other HTML features (e.g., unquoted attribute values). If you’re using a tool that injects self-closing tag syntax into all void elements, without any option to prevent it from doing so, then consider switching to a different tool.

In short:
<span /> is wrong, whereas <span> is at least a valid starting tag.

@rupasix
Copy link

rupasix commented Dec 19, 2023

I tried ...

@marcoroth
Copy link
Member

marcoroth commented Dec 19, 2023

Let's make it right then and let's use <span></span>

@ThomasLandauer
Copy link
Contributor Author

OK, there you go :-)

@marcoroth marcoroth merged commit 1153d5c into hotwired:main Dec 19, 2023
1 check passed
@ThomasLandauer ThomasLandauer deleted the patch-3 branch December 19, 2023 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants