-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}); |