_scrollbar.scss 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. /*
  2. * Container style
  3. */
  4. .ps {
  5. overflow: hidden !important;
  6. overflow-anchor: none;
  7. -ms-overflow-style: none;
  8. touch-action: auto;
  9. -ms-touch-action: auto;
  10. }
  11. // ._scrollbar {
  12. // overflow-x: hidden !important;
  13. // overflow-y: auto;
  14. // }
  15. /*
  16. * Scrollbar rail styles
  17. */
  18. .ps__rail-x {
  19. display: none;
  20. opacity: 0;
  21. transition: background-color 0.2s linear, opacity 0.2s linear;
  22. -webkit-transition: background-color 0.2s linear, opacity 0.2s linear;
  23. height: 15px;
  24. /* there must be 'bottom' or 'top' for ps__rail-x */
  25. bottom: 0px;
  26. /* please don't change 'position' */
  27. position: absolute;
  28. }
  29. .ps__rail-y {
  30. display: none;
  31. opacity: 0;
  32. transition: background-color 0.2s linear, opacity 0.2s linear;
  33. -webkit-transition: background-color 0.2s linear, opacity 0.2s linear;
  34. width: 15px;
  35. /* there must be 'right' or 'left' for ps__rail-y */
  36. right: 0;
  37. /* please don't change 'position' */
  38. position: absolute;
  39. }
  40. .ps--active-x > .ps__rail-x,
  41. .ps--active-y > .ps__rail-y {
  42. display: block;
  43. background-color: transparent;
  44. }
  45. .ps--focus > .ps__rail-x,
  46. .ps--focus > .ps__rail-y,
  47. .ps--scrolling-x > .ps__rail-x,
  48. .ps--scrolling-y > .ps__rail-y {
  49. opacity: 0.6;
  50. }
  51. .ps__rail-x:hover,
  52. .ps__rail-y:hover,
  53. .ps__rail-x:focus,
  54. .ps__rail-y:focus {
  55. background-color: transparent;
  56. opacity: 0.9;
  57. }
  58. /*
  59. * Scrollbar thumb styles
  60. */
  61. .ps__thumb-x {
  62. background-color: #aaa;
  63. border-radius: 6px;
  64. height: 6px;
  65. /* there must be 'bottom' for ps__thumb-x */
  66. bottom: 2px;
  67. /* please don't change 'position' */
  68. position: absolute;
  69. }
  70. .ps__thumb-y {
  71. @include gradient-vertical($scrollbarBackground, $scrollbarBackground2);
  72. border-radius: 6px;
  73. width: 6px;
  74. /* there must be 'right' for ps__thumb-y */
  75. right: 0px;
  76. /* please don't change 'position' */
  77. position: absolute;
  78. }
  79. /* MS supports */
  80. @supports (-ms-overflow-style: none) {
  81. .ps {
  82. overflow: auto !important;
  83. }
  84. }
  85. @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  86. .ps {
  87. overflow: auto !important;
  88. }
  89. }
  90. .ps__rail-x:hover,
  91. .ps__rail-y:hover,
  92. .ps__rail-x:focus,
  93. .ps__rail-y:focus {
  94. background-color: transparent;
  95. opacity: 0.9;
  96. }
  97. // Srollbars
  98. //
  99. // ::-webkit-scrollbar {
  100. // width: 8px;
  101. // height: 8px;
  102. // }
  103. // ::-webkit-scrollbar:hover {
  104. // height: 8px;
  105. // }
  106. ::-webkit-scrollbar {
  107. // Hide system scrollbar (Mac OS X)
  108. width: 0;
  109. height: 0;
  110. }
  111. ::-webkit-scrollbar-button:start:decrement,
  112. ::-webkit-scrollbar-button:end:increment {
  113. display: none;
  114. }
  115. ::-webkit-scrollbar-button:horizontal:decrement {
  116. display: none;
  117. }
  118. ::-webkit-scrollbar-button:horizontal:increment {
  119. display: none;
  120. }
  121. ::-webkit-scrollbar-button:vertical:decrement {
  122. display: none;
  123. }
  124. ::-webkit-scrollbar-button:vertical:increment {
  125. display: none;
  126. }
  127. ::-webkit-scrollbar-button:horizontal:decrement:active {
  128. background-image: none;
  129. }
  130. ::-webkit-scrollbar-button:horizontal:increment:active {
  131. background-image: none;
  132. }
  133. ::-webkit-scrollbar-button:vertical:decrement:active {
  134. background-image: none;
  135. }
  136. ::-webkit-scrollbar-button:vertical:increment:active {
  137. background-image: none;
  138. }
  139. ::-webkit-scrollbar-track-piece {
  140. background-color: transparent;
  141. }
  142. ::-webkit-scrollbar-thumb:vertical {
  143. height: 50px;
  144. background: -webkit-gradient(
  145. linear,
  146. left top,
  147. right top,
  148. color-stop(0%, $scrollbarBackground),
  149. color-stop(100%, $scrollbarBackground2)
  150. );
  151. border: 1px solid $scrollbarBorder;
  152. border-top: 1px solid $scrollbarBorder;
  153. border-left: 1px solid $scrollbarBorder;
  154. }
  155. ::-webkit-scrollbar-thumb:horizontal {
  156. width: 50px;
  157. background: -webkit-gradient(
  158. linear,
  159. left top,
  160. left bottom,
  161. color-stop(0%, $scrollbarBackground),
  162. color-stop(100%, $scrollbarBackground2)
  163. );
  164. border: 1px solid $scrollbarBorder;
  165. border-top: 1px solid $scrollbarBorder;
  166. border-left: 1px solid $scrollbarBorder;
  167. }
  168. // Baron styles
  169. .baron {
  170. // display: inline-block; // this brakes phantomjs rendering (width becomes 0)
  171. overflow: hidden;
  172. }
  173. // Fix for side menu on mobile devices
  174. .main-view.baron {
  175. width: unset;
  176. }
  177. .baron__clipper {
  178. position: relative;
  179. overflow: hidden;
  180. }
  181. .baron__scroller {
  182. overflow-y: scroll;
  183. -ms-overflow-style: none;
  184. -moz-box-sizing: border-box;
  185. box-sizing: border-box;
  186. margin: 0;
  187. border: 0;
  188. padding: 0;
  189. width: 100%;
  190. height: 100%;
  191. -webkit-overflow-scrolling: touch;
  192. /* remove line to customize scrollbar in iOs */
  193. }
  194. .baron__scroller::-webkit-scrollbar {
  195. width: 0;
  196. height: 0;
  197. }
  198. .baron__track {
  199. display: none;
  200. position: absolute;
  201. top: 0;
  202. right: 0;
  203. bottom: 0;
  204. }
  205. .baron._scrollbar .baron__track {
  206. display: block;
  207. }
  208. .baron__free {
  209. position: absolute;
  210. top: 0;
  211. bottom: 0;
  212. right: 0;
  213. }
  214. .baron__bar {
  215. display: none;
  216. position: absolute;
  217. right: 0;
  218. z-index: 1;
  219. // width: 10px;
  220. background: #999;
  221. // height: 15px;
  222. width: 15px;
  223. transition: background-color 0.2s linear, opacity 0.2s linear;
  224. opacity: 0;
  225. }
  226. .baron._scrollbar .baron__bar {
  227. display: block;
  228. @include gradient-vertical($scrollbarBackground, $scrollbarBackground2);
  229. border-radius: 6px;
  230. width: 6px;
  231. /* there must be 'right' for ps__thumb-y */
  232. right: 0px;
  233. /* please don't change 'position' */
  234. position: absolute;
  235. // background-color: transparent;
  236. // opacity: 0.6;
  237. &:hover,
  238. &:focus {
  239. // background-color: transparent;
  240. opacity: 0.9;
  241. }
  242. }
  243. .baron._scrolling > .baron__track .baron__bar {
  244. opacity: 0.6;
  245. }
  246. .baron__control {
  247. display: none;
  248. }
  249. .baron.panel-content--scrollable {
  250. // Width needs to be set to prevent content width issues
  251. // Set to less than 100% for fixing Firefox issue (white stripe on the right of scrollbar)
  252. width: calc(100% - 2px);
  253. .baron__scroller {
  254. padding-top: 1px;
  255. }
  256. }