From 65869821c1f14febf42e935aecaa3e59e16b0819 Mon Sep 17 00:00:00 2001 From: Hyunje Alex Jun Date: Tue, 21 Oct 2014 20:53:55 +0100 Subject: [PATCH] Use > CSS selector. This patch will resolve inner scrollbar problems. --- src/perfect-scrollbar.css | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/perfect-scrollbar.css b/src/perfect-scrollbar.css index d81bc97..173aac1 100644 --- a/src/perfect-scrollbar.css +++ b/src/perfect-scrollbar.css @@ -1,4 +1,4 @@ -.ps-container .ps-scrollbar-x-rail { +.ps-container>.ps-scrollbar-x-rail { position: absolute; /* please don't change 'position' */ bottom: 3px; /* there must be 'bottom' for ps-scrollbar-x-rail */ height: 8px; @@ -13,26 +13,24 @@ transition: background-color .2s linear, opacity .2s linear; } -.ps-container:hover .ps-scrollbar-x-rail, -.ps-container.hover .ps-scrollbar-x-rail { +.ps-container:hover>.ps-scrollbar-x-rail { opacity: 0.6; filter: alpha(opacity=60); } -.ps-container .ps-scrollbar-x-rail:hover, -.ps-container .ps-scrollbar-x-rail.hover { +.ps-container>.ps-scrollbar-x-rail:hover { background-color: #eee; opacity: 0.9; filter: alpha(opacity=90); } -.ps-container .ps-scrollbar-x-rail.in-scrolling { +.ps-container>.ps-scrollbar-x-rail.in-scrolling { background-color: #eee; opacity: 0.9; filter: alpha(opacity=90); } -.ps-container .ps-scrollbar-y-rail { +.ps-container>.ps-scrollbar-y-rail { position: absolute; /* please don't change 'position' */ right: 3px; /* there must be 'right' for ps-scrollbar-y-rail */ width: 8px; @@ -47,26 +45,24 @@ transition: background-color .2s linear, opacity .2s linear; } -.ps-container:hover .ps-scrollbar-y-rail, -.ps-container.hover .ps-scrollbar-y-rail { +.ps-container:hover>.ps-scrollbar-y-rail { opacity: 0.6; filter: alpha(opacity=60); } -.ps-container .ps-scrollbar-y-rail:hover, -.ps-container .ps-scrollbar-y-rail.hover { +.ps-container>.ps-scrollbar-y-rail:hover { background-color: #eee; opacity: 0.9; filter: alpha(opacity=90); } -.ps-container .ps-scrollbar-y-rail.in-scrolling { +.ps-container>.ps-scrollbar-y-rail.in-scrolling { background-color: #eee; opacity: 0.9; filter: alpha(opacity=90); } -.ps-container .ps-scrollbar-x { +.ps-container>.ps-scrollbar-x-rail>.ps-scrollbar-x { position: absolute; /* please don't change 'position' */ bottom: 0; /* there must be 'bottom' for ps-scrollbar-x */ height: 8px; @@ -80,12 +76,11 @@ transition: background-color .2s linear; } -.ps-container .ps-scrollbar-x-rail:hover .ps-scrollbar-x, -.ps-container .ps-scrollbar-x-rail.hover .ps-scrollbar-x { +.ps-container>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x { background-color: #999; } -.ps-container .ps-scrollbar-y { +.ps-container>.ps-scrollbar-y-rail>.ps-scrollbar-y { position: absolute; /* please don't change 'position' */ right: 0; /* there must be 'right' for ps-scrollbar-y */ width: 8px; @@ -99,7 +94,6 @@ transition: background-color .2s linear; } -.ps-container .ps-scrollbar-y-rail:hover .ps-scrollbar-y, -.ps-container .ps-scrollbar-y-rail.hover .ps-scrollbar-y { +.ps-container>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y { background-color: #999; }