Skip to content

Commit

Permalink
Added css-calc standalone test
Browse files Browse the repository at this point in the history
  • Loading branch information
Calvein committed Mar 31, 2012
1 parent 065e91d commit 129d5bc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions feature-detects/css-calc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// cubic-bezier values can't be > 1 for Webkit until bug #45761 (https://bugs.webkit.org/show_bug.cgi?id=45761) is fixed
// By @calvein

Modernizr.addTest('csscalc', function(el, prop, value) {
prop = 'width:';
value = 'calc(10px);';
el = document.createElement('div');
el.style.cssText = prop + Modernizr._prefixes.join(value + prop)
return !!el.style.length;
});

0 comments on commit 129d5bc

Please sign in to comment.