You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
427 B
20 lines
427 B
7 years ago
|
// Stylable scrollbars detection
|
||
|
Modernizr.addTest('cssscrollbar', function() {
|
||
|
|
||
|
var bool,
|
||
|
|
||
|
styles = "#modernizr{overflow: scroll; width: 40px }#" +
|
||
|
Modernizr._prefixes
|
||
|
.join("scrollbar{width:0px}"+' #modernizr::')
|
||
|
.split('#')
|
||
|
.slice(1)
|
||
|
.join('#') + "scrollbar{width:0px}";
|
||
|
|
||
|
Modernizr.testStyles(styles, function(node) {
|
||
|
bool = 'scrollWidth' in node && node.scrollWidth == 40;
|
||
|
});
|
||
|
|
||
|
return bool;
|
||
|
|
||
|
});
|