summaryrefslogtreecommitdiff
path: root/source/bower_components/modernizr/feature-detects/css-scrollbars.js
diff options
context:
space:
mode:
Diffstat (limited to 'source/bower_components/modernizr/feature-detects/css-scrollbars.js')
-rw-r--r--source/bower_components/modernizr/feature-detects/css-scrollbars.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/bower_components/modernizr/feature-detects/css-scrollbars.js b/source/bower_components/modernizr/feature-detects/css-scrollbars.js
new file mode 100644
index 0000000..f26de9f
--- /dev/null
+++ b/source/bower_components/modernizr/feature-detects/css-scrollbars.js
@@ -0,0 +1,19 @@
+// 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;
+
+});