hotwired / stimulus

A modest JavaScript framework for the HTML you already have
https://stimulus.hotwired.dev/
MIT License
12.67k stars 421 forks source link

Removing self-closing tag #744

Closed ThomasLandauer closed 9 months ago

rupasix commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

I tried ...

marcoroth commented 9 months ago

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

ThomasLandauer commented 9 months ago

OK, there you go :-)