Skip to content
This repository was archived by the owner on Dec 11, 2021. It is now read-only.

[hidden] { display: none !important; } #109

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions scss/_utilities/_hidden.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* ==========================================================================
* Hidden attribute
*
* Make the [hidden] global HTML attribute much more useful.
* It's intended to be used to hide elements, but since it's not `!important`
* by default, it's normally trumped by mere CSS classes that were only meant
* to set a default `display` value. Making it `!important` (which is fine
* because this is a utility attribute) corrects this shortcoming.
* https://html.spec.whatwg.org/multipage/interaction.html#the-hidden-attribute
* https://html.spec.whatwg.org/multipage/rendering.html#hiddenCSS
* ==========================================================================
*/

[hidden] {
display: none !important;
}
3 changes: 2 additions & 1 deletion scss/lint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

@import
"_utilities/clearfix",
"_utilities/colors";
"_utilities/colors",
"_utilities/hidden";

@import
"atoms/icons/icons",
Expand Down
3 changes: 2 additions & 1 deletion scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
// ==========================================================================

@import
"_utilities/clearfix";
"_utilities/clearfix",
"_utilities/hidden";

@import
"atoms/icons/icons",
Expand Down