summaryrefslogtreecommitdiff
path: root/source/bower_components/modernizr/feature-detects/css-calc.js
blob: bb5b7e93d0ff98ce870968c27612bd067ad41171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Method of allowing calculated values for length units, i.e. width: calc(100%-3em) http://caniuse.com/#search=calc
// By @calvein

Modernizr.addTest('csscalc', function() {
    var prop = 'width:';
    var value = 'calc(10px);';
    var el = document.createElement('div');

    el.style.cssText = prop + Modernizr._prefixes.join(value + prop);

    return !!el.style.length;
});