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.
[hidden] attribute is a part of HTML 5 and widely supported (ie11+)
example usage:
<p hidden>this text is will have display: none set by browser</p>
it is hiding the element the same way as
.hidden
class do, but the trick is that if you have any style that applyingdisplay: block
(or any other display value). it will override the [hidden] styleSource
So I suggest to add
[hidden]
attr to a.hidden
class.I assume that if you want to merge this PR this should be added to docs. Let me know if you want me to add it there.
Example on html5-boilerplate:


After suggested fix:
Useful links:
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden
https://www.w3.org/TR/html51/editing.html#the-hidden-attribute
https://css-tricks.com/the-hidden-attribute-is-visibly-weak/
Types of changes
Checklist:
Pull requests should be thought of as a conversation. There will be some back and forth when trying to get code merged into this or any other project. With all but the simplest changes you can and should expect that the maintainers of the project will request changes to your code. Please be aware of that and check in after you open your PR in order to get your code merged in cleanly.
Thanks!