-
Notifications
You must be signed in to change notification settings - Fork 1
Feature Detection
Eric Debelak edited this page Jul 10, 2017
·
1 revision
The starter theme uses Modernizr for feature detection.
By default, the theme looks for flexbox, svg and css columns out of the box. When support for the feature is detected it adds a class to the <html>
tag. For instance, svg support would look like this:
<html class='svg'>
Whereas no support would look like this:
<html class='no-svg'>
This allows you to write css for supported and non-supported browsers. For instance:
.flexbox
.some-class
display: flex
.no-flexbox
.some-class
float: left
To add more features, visit modernizr.com and download a new custom build, and rewrite js/modernizr.js
with your new build code.