Skip to content

Commit

Permalink
sticky test. just formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Aug 31, 2012
1 parent cfd831f commit 47d4b97
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions feature-detects/css-positionsticky.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
// Sticky positioning - constrains an element to be positioned inside the
// intersection of its container box, and the viewport.
Modernizr.addTest('csspositionsticky', function () {
var prop = 'position:',
value = 'sticky',
el = document.createElement('modernizr'),
mStyle = el.style;
mStyle.cssText = prop + Modernizr._prefixes.join(value + ';' + prop).slice(0, -prop.length);
return mStyle.position.indexOf(value) !== -1;
});
// Sticky positioning - constrains an element to be positioned inside the
// intersection of its container box, and the viewport.
Modernizr.addTest('csspositionsticky', function () {

var prop = 'position:';
var value = 'sticky';
var el = document.createElement('modernizr');
var mStyle = el.style;

mStyle.cssText = prop + Modernizr._prefixes.join(value + ';' + prop).slice(0, -prop.length);

return mStyle.position.indexOf(value) !== -1;
});

0 comments on commit 47d4b97

Please sign in to comment.