perfect-scrollbar.scss 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /* perfect-scrollbar v0.6.5 */
  2. .ps-container {
  3. -ms-touch-action: none;
  4. overflow: hidden !important;
  5. &.ps-active-x > .ps-scrollbar-x-rail, &.ps-active-y > .ps-scrollbar-y-rail {
  6. display: block;
  7. }
  8. &.ps-in-scrolling {
  9. pointer-events: none;
  10. &.ps-x > .ps-scrollbar-x-rail {
  11. background-color: #eee;
  12. opacity: 0.9;
  13. & > .ps-scrollbar-x {
  14. background-color: #999;
  15. }
  16. }
  17. &.ps-y > .ps-scrollbar-y-rail {
  18. background-color: #eee;
  19. opacity: 0.9;
  20. & > .ps-scrollbar-y {
  21. background-color: #999;
  22. }
  23. }
  24. }
  25. & > .ps-scrollbar-x-rail {
  26. display: none;
  27. position: absolute;
  28. /* please don't change 'position' */
  29. -webkit-border-radius: 4px;
  30. -moz-border-radius: 4px;
  31. -ms-border-radius: 4px;
  32. border-radius: 4px;
  33. opacity: 0;
  34. -webkit-transition: background-color .2s linear, opacity .2s linear;
  35. -moz-transition: background-color .2s linear, opacity .2s linear;
  36. -o-transition: background-color .2s linear, opacity .2s linear;
  37. transition: background-color .2s linear, opacity .2s linear;
  38. bottom: 3px;
  39. /* there must be 'bottom' for ps-scrollbar-x-rail */
  40. height: 8px;
  41. margin: 0 3px;
  42. & > .ps-scrollbar-x {
  43. position: absolute;
  44. /* please don't change 'position' */
  45. background-color: #aaa;
  46. -webkit-border-radius: 4px;
  47. -moz-border-radius: 4px;
  48. -ms-border-radius: 4px;
  49. border-radius: 4px;
  50. -webkit-transition: background-color .2s linear;
  51. -moz-transition: background-color .2s linear;
  52. -o-transition: background-color .2s linear;
  53. transition: background-color .2s linear;
  54. bottom: 0;
  55. /* there must be 'bottom' for ps-scrollbar-x */
  56. height: 8px;
  57. }
  58. }
  59. & > .ps-scrollbar-y-rail {
  60. display: none;
  61. position: absolute;
  62. /* please don't change 'position' */
  63. -webkit-border-radius: 4px;
  64. -moz-border-radius: 4px;
  65. -ms-border-radius: 4px;
  66. border-radius: 4px;
  67. opacity: 0;
  68. -webkit-transition: background-color .2s linear, opacity .2s linear;
  69. -moz-transition: background-color .2s linear, opacity .2s linear;
  70. -o-transition: background-color .2s linear, opacity .2s linear;
  71. transition: background-color .2s linear, opacity .2s linear;
  72. right: 3px;
  73. /* there must be 'right' for ps-scrollbar-y-rail */
  74. width: 8px;
  75. margin: 3px 0;
  76. & > .ps-scrollbar-y {
  77. position: absolute;
  78. /* please don't change 'position' */
  79. background-color: #aaa;
  80. -webkit-border-radius: 4px;
  81. -moz-border-radius: 4px;
  82. -ms-border-radius: 4px;
  83. border-radius: 4px;
  84. -webkit-transition: background-color .2s linear;
  85. -moz-transition: background-color .2s linear;
  86. -o-transition: background-color .2s linear;
  87. transition: background-color .2s linear;
  88. right: 0;
  89. /* there must be 'right' for ps-scrollbar-y */
  90. width: 8px;
  91. }
  92. }
  93. &:hover.ps-in-scrolling {
  94. pointer-events: none;
  95. &.ps-x > .ps-scrollbar-x-rail {
  96. background-color: #eee;
  97. opacity: 0.9;
  98. & > .ps-scrollbar-x {
  99. background-color: #999;
  100. }
  101. }
  102. &.ps-y > .ps-scrollbar-y-rail {
  103. background-color: #eee;
  104. opacity: 0.9;
  105. & > .ps-scrollbar-y {
  106. background-color: #999;
  107. }
  108. }
  109. }
  110. &:hover {
  111. & > .ps-scrollbar-x-rail, &:hover > .ps-scrollbar-y-rail {
  112. opacity: 0.6;
  113. }
  114. & > .ps-scrollbar-x-rail:hover {
  115. background-color: #eee;
  116. opacity: 0.9;
  117. & > .ps-scrollbar-x {
  118. background-color: #999;
  119. }
  120. }
  121. & > .ps-scrollbar-y-rail:hover {
  122. background-color: #eee;
  123. opacity: 0.9;
  124. & > .ps-scrollbar-y {
  125. background-color: #999;
  126. }
  127. }
  128. }
  129. }