_scrollbar.scss 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. /**
  2. * gemini-scrollbar
  3. * @version 1.5.2
  4. * @link http://noeldelgado.github.io/gemini-scrollbar/
  5. * @license MIT
  6. */
  7. /* disable selection while dragging */
  8. .gm-scrollbar-disable-selection {
  9. -webkit-touch-callout: none;
  10. -webkit-user-select: none;
  11. -khtml-user-select: none;
  12. -moz-user-select: none;
  13. -ms-user-select: none;
  14. user-select: none;
  15. }
  16. /* fallback for native floating scrollbars */
  17. .gm-prevented {
  18. -webkit-overflow-scrolling: touch;
  19. }
  20. .gm-prevented > .gm-scrollbar {
  21. display: none;
  22. }
  23. /* actual gemini-scrollbar styles */
  24. .gm-scrollbar-container {
  25. position: relative;
  26. overflow: hidden!important;
  27. width: 100%;
  28. height: 100%;
  29. }
  30. .gm-scrollbar {
  31. position: absolute;
  32. right: 2px;
  33. bottom: 2px;
  34. z-index: 1;
  35. border-radius: 3px;
  36. &:hover {
  37. .thumb {
  38. opacity: 1;
  39. transition: opacity 100ms ease-in-out;
  40. }
  41. }
  42. }
  43. .gm-scrollbar.-vertical {
  44. width: 6px;
  45. top: 2px;
  46. }
  47. .gm-scrollbar.-horizontal {
  48. height: 6px;
  49. left: 2px;
  50. }
  51. .gm-scrollbar .thumb {
  52. position: relative;
  53. display: block;
  54. width: 0;
  55. height: 0;
  56. cursor: pointer;
  57. border-radius: inherit;
  58. background-color: $dark-5;
  59. transform: translate3d(0,0,0);
  60. opacity: 0;
  61. }
  62. .gemini-scrolling {
  63. .gm-scrollbar .thumb {
  64. opacity: 1;
  65. transition: opacity 100ms ease-in-out;
  66. }
  67. }
  68. .gm-scrollbar .thumb:hover,
  69. .gm-scrollbar .thumb:active {
  70. background-color: $blue-dark;
  71. }
  72. .gm-scrollbar.-vertical .thumb {
  73. width: 100%;
  74. }
  75. .gm-scrollbar.-horizontal .thumb {
  76. height: 100%;
  77. }
  78. .gm-scrollbar-container .gm-scroll-view {
  79. width: 100%;
  80. height: 100%;
  81. overflow: scroll;
  82. transform: translate3d(0,0,0);
  83. -webkit-overflow-scrolling: touch;
  84. }
  85. /* @option: autoshow */
  86. .gm-scrollbar-container.gm-autoshow .gm-scrollbar {
  87. opacity: 0;
  88. transition: opacity 120ms ease-out;
  89. }
  90. .gm-scrollbar-container.gm-autoshow:hover > .gm-scrollbar,
  91. .gm-scrollbar-container.gm-autoshow:active > .gm-scrollbar,
  92. .gm-scrollbar-container.gm-autoshow:focus > .gm-scrollbar {
  93. opacity: 1;
  94. transition: opacity 340ms ease-out;
  95. }
  96. .gm-resize-trigger {
  97. position: absolute;
  98. display: block;
  99. top: 0;
  100. left: 0;
  101. height: 100%;
  102. width: 100%;
  103. overflow: hidden;
  104. pointer-events: none;
  105. z-index: -1;
  106. opacity: 0;
  107. }
  108. // Srollbars
  109. //
  110. ::-webkit-scrollbar {
  111. width: 8px;
  112. height: 8px;
  113. }
  114. ::-webkit-scrollbar:hover {
  115. height: 8px;
  116. }
  117. ::-webkit-scrollbar-button:start:decrement,
  118. ::-webkit-scrollbar-button:end:increment { display: none; }
  119. ::-webkit-scrollbar-button:horizontal:decrement { display: none; }
  120. ::-webkit-scrollbar-button:horizontal:increment { display: none; }
  121. ::-webkit-scrollbar-button:vertical:decrement { display: none; }
  122. ::-webkit-scrollbar-button:vertical:increment { display: none; }
  123. ::-webkit-scrollbar-button:horizontal:decrement:active { background-image: none; }
  124. ::-webkit-scrollbar-button:horizontal:increment:active { background-image: none; }
  125. ::-webkit-scrollbar-button:vertical:decrement:active { background-image: none; }
  126. ::-webkit-scrollbar-button:vertical:increment:active {background-image: none; }
  127. ::-webkit-scrollbar-track-piece { background-color: transparent; }
  128. ::-webkit-scrollbar-thumb:vertical {
  129. height: 50px;
  130. background: -webkit-gradient(linear, left top, right top, color-stop(0%, $scrollbarBackground), color-stop(100%, $scrollbarBackground2));
  131. border: 1px solid $scrollbarBorder;
  132. border-top: 1px solid $scrollbarBorder;
  133. border-left: 1px solid $scrollbarBorder;
  134. }
  135. ::-webkit-scrollbar-thumb:horizontal {
  136. width: 50px;
  137. background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, $scrollbarBackground), color-stop(100%, $scrollbarBackground2));
  138. border: 1px solid $scrollbarBorder;
  139. border-top: 1px solid $scrollbarBorder;
  140. border-left: 1px solid $scrollbarBorder;
  141. }