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!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With