Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modernizr .hidden class

I just included Modernizr in my project, but it adds the .hidden class to my html tag. This causes Bootstrap to hide the entire html tag, which is, well, not that useful..

Does anybody know why it adds the .hidden class to the html?

Thanks in advance!

like image 344
Bram Avatar asked Feb 10 '23 01:02

Bram


1 Answers

I encountered the exact same issue and found two solutions.

Looking through the Modernizr download page, it looks like the "hidden" class is added when Modernizr is checking for and detects support for the [hidden] attribute.

Simply make a build of Modernizr with detection for the [hidden] attribute omitted.

If you actually need to detect it, and overriding Bootstrap's CSS rule with your own on html.hidden isn't something you want to do, you can configure Modernizr with a class prefix to prevent the name clashing.

like image 181
nikelmwann Avatar answered Feb 11 '23 13:02

nikelmwann