Skip to content

Commit

Permalink
-fixed demo page slowness on Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
yairEO committed Jul 2, 2018
1 parent 4a1af1f commit 23f62ca
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions fakescroll.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.fakeScroll__scope{ overflow:visible !important; }

.fakeScroll__wrap{
overflow : hidden;
height : 100%;
Expand Down
2 changes: 2 additions & 0 deletions fakescroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
DOM.track = DOM.scrollWrap.nextElementSibling;
DOM.bar = DOM.track.firstElementChild;

DOM.scope.classList.add("fakeScroll__scope");

return DOM;
},

Expand Down
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
background-image: -moz-radial-gradient( top, circle cover, #3c3b52 0%, #252233 100%);
background-image: -o-radial-gradient( top, circle cover, #3c3b52 0%, #252233 100%);
background-image: radial-gradient( top, circle cover, #3c3b52 0%, #252233 100%);
background: #252233;
}

.foo{ position:absolute; top:0; right:0; bottom:0; left:0; margin:auto; min-height:70%; height:1px; width:500px; }
.foo{ position:absolute; top:0; right:0; bottom:0; left:0; margin:auto; min-height:70%; height:1px; width:500px; overflow:auto; background:white; }
.foo.fakeScroll__scope{ background:none; }
.foo .fakeScroll__content{ padding-top:1em; padding-bottom:1em; }
.foo .fakeScroll__wrap{ background:#FFF; border-radius:4px; -moz-box-sizing:border-box; box-sizing:border-box; }

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yaireo/fakescroll",
"version": "2.0.0",
"version": "2.0.1",
"homepage": "https://github.com/yairEO/fakescroll",
"description": "Very lightweight & robust custom-looking HTML scrollbar script.",
"_npmUser": {
Expand Down

0 comments on commit 23f62ca

Please sign in to comment.