_scrollbar.scss 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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. // Scrollbars
  98. .no-overlay-scrollbar {
  99. ::-webkit-scrollbar {
  100. width: 8px;
  101. height: 8px;
  102. }
  103. ::-webkit-scrollbar:hover {
  104. height: 8px;
  105. }
  106. ::-webkit-scrollbar-button:start:decrement,
  107. ::-webkit-scrollbar-button:end:increment {
  108. display: none;
  109. }
  110. ::-webkit-scrollbar-button:horizontal:decrement {
  111. display: none;
  112. }
  113. ::-webkit-scrollbar-button:horizontal:increment {
  114. display: none;
  115. }
  116. ::-webkit-scrollbar-button:vertical:decrement {
  117. display: none;
  118. }
  119. ::-webkit-scrollbar-button:vertical:increment {
  120. display: none;
  121. }
  122. ::-webkit-scrollbar-button:horizontal:decrement:active {
  123. background-image: none;
  124. }
  125. ::-webkit-scrollbar-button:horizontal:increment:active {
  126. background-image: none;
  127. }
  128. ::-webkit-scrollbar-button:vertical:decrement:active {
  129. background-image: none;
  130. }
  131. ::-webkit-scrollbar-button:vertical:increment:active {
  132. background-image: none;
  133. }
  134. ::-webkit-scrollbar-track-piece {
  135. background-color: transparent;
  136. }
  137. ::-webkit-scrollbar-thumb:vertical {
  138. height: 50px;
  139. background: -webkit-gradient(
  140. linear,
  141. left top,
  142. right top,
  143. color-stop(0%, $scrollbarBackground),
  144. color-stop(100%, $scrollbarBackground2)
  145. );
  146. border: 1px solid $scrollbarBorder;
  147. border-top: 1px solid $scrollbarBorder;
  148. border-left: 1px solid $scrollbarBorder;
  149. }
  150. ::-webkit-scrollbar-thumb:horizontal {
  151. width: 50px;
  152. background: -webkit-gradient(
  153. linear,
  154. left top,
  155. left bottom,
  156. color-stop(0%, $scrollbarBackground),
  157. color-stop(100%, $scrollbarBackground2)
  158. );
  159. border: 1px solid $scrollbarBorder;
  160. border-top: 1px solid $scrollbarBorder;
  161. border-left: 1px solid $scrollbarBorder;
  162. }
  163. }
  164. // Baron styles
  165. .baron {
  166. // display: inline-block; // this brakes phantomjs rendering (width becomes 0)
  167. overflow: hidden;
  168. }
  169. // Fix for side menu on mobile devices
  170. .main-view.baron {
  171. width: unset;
  172. }
  173. .baron__clipper {
  174. position: relative;
  175. overflow: hidden;
  176. }
  177. .baron__scroller {
  178. overflow-y: scroll;
  179. -ms-overflow-style: none;
  180. -moz-box-sizing: border-box;
  181. box-sizing: border-box;
  182. margin: 0;
  183. border: 0;
  184. padding: 0;
  185. width: 100%;
  186. height: 100%;
  187. -webkit-overflow-scrolling: touch;
  188. /* remove line to customize scrollbar in iOs */
  189. }
  190. .baron__scroller::-webkit-scrollbar {
  191. width: 0;
  192. height: 0;
  193. }
  194. .baron__track {
  195. display: none;
  196. position: absolute;
  197. top: 0;
  198. right: 0;
  199. bottom: 0;
  200. }
  201. .baron._scrollbar .baron__track {
  202. display: block;
  203. }
  204. .baron__free {
  205. position: absolute;
  206. top: 0;
  207. bottom: 0;
  208. right: 0;
  209. }
  210. .baron__bar {
  211. display: none;
  212. position: absolute;
  213. right: 0;
  214. z-index: 1;
  215. // width: 10px;
  216. background: #999;
  217. // height: 15px;
  218. width: 15px;
  219. transition: background-color 0.2s linear, opacity 0.2s linear;
  220. opacity: 0;
  221. }
  222. .baron._scrollbar .baron__bar {
  223. display: block;
  224. @include gradient-vertical($scrollbarBackground, $scrollbarBackground2);
  225. border-radius: 6px;
  226. width: 6px;
  227. /* there must be 'right' for ps__thumb-y */
  228. right: 0px;
  229. /* please don't change 'position' */
  230. position: absolute;
  231. // background-color: transparent;
  232. // opacity: 0.6;
  233. &:hover,
  234. &:focus {
  235. // background-color: transparent;
  236. opacity: 0.9;
  237. }
  238. }
  239. .panel-hover-highlight .baron__track .baron__bar {
  240. opacity: 0.6;
  241. }
  242. .baron._scrolling > .baron__track .baron__bar {
  243. opacity: 0.9;
  244. }
  245. .baron__control {
  246. display: none;
  247. }
  248. .baron.panel-content--scrollable {
  249. // Width needs to be set to prevent content width issues
  250. // Set to less than 100% for fixing Firefox issue (white stripe on the right of scrollbar)
  251. width: calc(100% - 2px);
  252. .baron__scroller {
  253. padding-top: 1px;
  254. }
  255. }
  256. .scroll-margin-helper {
  257. margin-right: 12px;
  258. }