_scrollbar.scss 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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. // //
  99. //
  100. // ::-webkit-scrollbar {
  101. // width: 8px;
  102. // height: 8px;
  103. // }
  104. //
  105. // ::-webkit-scrollbar:hover {
  106. // height: 8px;
  107. // }
  108. //
  109. // ::-webkit-scrollbar-button:start:decrement,
  110. // ::-webkit-scrollbar-button:end:increment {
  111. // display: none;
  112. // }
  113. // ::-webkit-scrollbar-button:horizontal:decrement {
  114. // display: none;
  115. // }
  116. // ::-webkit-scrollbar-button:horizontal:increment {
  117. // display: none;
  118. // }
  119. // ::-webkit-scrollbar-button:vertical:decrement {
  120. // display: none;
  121. // }
  122. // ::-webkit-scrollbar-button:vertical:increment {
  123. // display: none;
  124. // }
  125. // ::-webkit-scrollbar-button:horizontal:decrement:active {
  126. // background-image: none;
  127. // }
  128. // ::-webkit-scrollbar-button:horizontal:increment:active {
  129. // background-image: none;
  130. // }
  131. // ::-webkit-scrollbar-button:vertical:decrement:active {
  132. // background-image: none;
  133. // }
  134. // ::-webkit-scrollbar-button:vertical:increment:active {
  135. // background-image: none;
  136. // }
  137. // ::-webkit-scrollbar-track-piece {
  138. // background-color: transparent;
  139. // }
  140. //
  141. // ::-webkit-scrollbar-thumb:vertical {
  142. // height: 50px;
  143. // background: -webkit-gradient(
  144. // linear,
  145. // left top,
  146. // right top,
  147. // color-stop(0%, $scrollbarBackground),
  148. // color-stop(100%, $scrollbarBackground2)
  149. // );
  150. // border: 1px solid $scrollbarBorder;
  151. // border-top: 1px solid $scrollbarBorder;
  152. // border-left: 1px solid $scrollbarBorder;
  153. // }
  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. //
  169. // Baron styles
  170. .baron {
  171. // display: inline-block; // this brakes phantomjs rendering (width becomes 0)
  172. overflow: hidden;
  173. }
  174. // Fix for side menu on mobile devices
  175. .main-view.baron {
  176. width: unset;
  177. }
  178. .baron__clipper {
  179. position: relative;
  180. overflow: hidden;
  181. }
  182. .baron__scroller {
  183. overflow-y: scroll;
  184. -ms-overflow-style: none;
  185. -moz-box-sizing: border-box;
  186. box-sizing: border-box;
  187. margin: 0;
  188. border: 0;
  189. padding: 0;
  190. width: 100%;
  191. height: 100%;
  192. -webkit-overflow-scrolling: touch;
  193. /* remove line to customize scrollbar in iOs */
  194. }
  195. .baron__scroller::-webkit-scrollbar {
  196. width: 0;
  197. height: 0;
  198. }
  199. .baron__track {
  200. display: none;
  201. position: absolute;
  202. top: 0;
  203. right: 0;
  204. bottom: 0;
  205. }
  206. .baron._scrollbar .baron__track {
  207. display: block;
  208. }
  209. .baron__free {
  210. position: absolute;
  211. top: 0;
  212. bottom: 0;
  213. right: 0;
  214. }
  215. .baron__bar {
  216. display: none;
  217. position: absolute;
  218. right: 0;
  219. z-index: 1;
  220. // width: 10px;
  221. background: #999;
  222. // height: 15px;
  223. width: 15px;
  224. transition: background-color 0.2s linear, opacity 0.2s linear;
  225. opacity: 0;
  226. }
  227. .baron._scrollbar .baron__bar {
  228. display: block;
  229. @include gradient-vertical($scrollbarBackground, $scrollbarBackground2);
  230. border-radius: 6px;
  231. width: 6px;
  232. /* there must be 'right' for ps__thumb-y */
  233. right: 0px;
  234. /* please don't change 'position' */
  235. position: absolute;
  236. // background-color: transparent;
  237. // opacity: 0.6;
  238. &:hover,
  239. &:focus {
  240. // background-color: transparent;
  241. opacity: 0.9;
  242. }
  243. }
  244. .panel-hover-highlight .baron__track .baron__bar {
  245. opacity: 0.6;
  246. }
  247. .baron._scrolling > .baron__track .baron__bar {
  248. opacity: 0.9;
  249. }
  250. // fix for phantomjs
  251. .body--phantomjs .baron__track .baron__bar {
  252. opacity: 0 !important;
  253. }
  254. .baron__control {
  255. display: none;
  256. }
  257. .baron.panel-content--scrollable {
  258. // Width needs to be set to prevent content width issues
  259. // Set to less than 100% for fixing Firefox issue (white stripe on the right of scrollbar)
  260. width: calc(100% - 2px);
  261. .baron__scroller {
  262. padding-top: 1px;
  263. }
  264. }
  265. // Custom styles for 'react-custom-scrollbars'
  266. .custom-scrollbars {
  267. // Fix for Firefox. For some reason sometimes .view container gets a height of its content, but in order to
  268. // make scroll working it should fit outer container size (scroll appears only when inner container size is
  269. // greater than outer one).
  270. display: flex;
  271. flex-grow: 1;
  272. .view {
  273. display: flex;
  274. flex-grow: 1;
  275. flex-direction: column;
  276. }
  277. .track-vertical {
  278. border-radius: 3px;
  279. width: 6px !important;
  280. right: 2px;
  281. bottom: 2px;
  282. top: 2px;
  283. }
  284. .track-horizontal {
  285. border-radius: 3px;
  286. height: 6px !important;
  287. right: 2px;
  288. bottom: 2px;
  289. left: 2px;
  290. }
  291. .thumb-vertical {
  292. @include gradient-vertical($scrollbarBackground, $scrollbarBackground2);
  293. border-radius: 6px;
  294. }
  295. .thumb-horizontal {
  296. @include gradient-horizontal($scrollbarBackground, $scrollbarBackground2);
  297. border-radius: 6px;
  298. }
  299. }
  300. .scroll-margin-helper {
  301. margin-right: 12px;
  302. }