scrollbar.css 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. /*-----------------------------------------------------------------------------
  2. | Copyright (c) Jupyter Development Team.
  3. | Distributed under the terms of the Modified BSD License.
  4. |----------------------------------------------------------------------------*/
  5. /*
  6. * Mozilla scrollbar styling
  7. */
  8. /* use standard opaque scrollbars for most nodes */
  9. div.jp-LabShell[data-jp-theme-scrollbars='true'] {
  10. scrollbar-color: rgb(var(--jp-scrollbar-thumb-color))
  11. var(--jp-scrollbar-background-color);
  12. }
  13. /* for code nodes, use a transparent style of scrollbar */
  14. [data-jp-theme-scrollbars='true'] .CodeMirror-hscrollbar,
  15. [data-jp-theme-scrollbars='true'] .CodeMirror-vscrollbar {
  16. scrollbar-color: rgba(var(--jp-scrollbar-thumb-color), 0.5) transparent;
  17. }
  18. /*
  19. * Webkit scrollbar styling
  20. */
  21. /* use standard opaque scrollbars for most nodes */
  22. [data-jp-theme-scrollbars='true'] ::-webkit-scrollbar,
  23. [data-jp-theme-scrollbars='true'] ::-webkit-scrollbar-corner {
  24. background: var(--jp-scrollbar-background-color);
  25. }
  26. [data-jp-theme-scrollbars='true'] ::-webkit-scrollbar-thumb {
  27. background: rgb(var(--jp-scrollbar-thumb-color));
  28. border: var(--jp-scrollbar-thumb-margin) solid transparent;
  29. background-clip: content-box;
  30. border-radius: var(--jp-scrollbar-thumb-radius);
  31. }
  32. [data-jp-theme-scrollbars='true'] ::-webkit-scrollbar-track:horizontal {
  33. border-left: var(--jp-scrollbar-endpad) solid
  34. var(--jp-scrollbar-background-color);
  35. border-right: var(--jp-scrollbar-endpad) solid
  36. var(--jp-scrollbar-background-color);
  37. }
  38. [data-jp-theme-scrollbars='true'] ::-webkit-scrollbar-track:vertical {
  39. border-top: var(--jp-scrollbar-endpad) solid
  40. var(--jp-scrollbar-background-color);
  41. border-bottom: var(--jp-scrollbar-endpad) solid
  42. var(--jp-scrollbar-background-color);
  43. }
  44. /* for code nodes, use a transparent style of scrollbar */
  45. [data-jp-theme-scrollbars='true'] .CodeMirror-hscrollbar::-webkit-scrollbar,
  46. [data-jp-theme-scrollbars='true'] .CodeMirror-vscrollbar::-webkit-scrollbar,
  47. [data-jp-theme-scrollbars='true']
  48. .CodeMirror-hscrollbar::-webkit-scrollbar-corner,
  49. [data-jp-theme-scrollbars='true']
  50. .CodeMirror-vscrollbar::-webkit-scrollbar-corner {
  51. background-color: transparent;
  52. }
  53. [data-jp-theme-scrollbars='true']
  54. .CodeMirror-hscrollbar::-webkit-scrollbar-thumb,
  55. [data-jp-theme-scrollbars='true']
  56. .CodeMirror-vscrollbar::-webkit-scrollbar-thumb {
  57. background: rgba(var(--jp-scrollbar-thumb-color), 0.5);
  58. border: var(--jp-scrollbar-thumb-margin) solid transparent;
  59. background-clip: content-box;
  60. border-radius: var(--jp-scrollbar-thumb-radius);
  61. }
  62. [data-jp-theme-scrollbars='true']
  63. .CodeMirror-hscrollbar::-webkit-scrollbar-track:horizontal {
  64. border-left: var(--jp-scrollbar-endpad) solid transparent;
  65. border-right: var(--jp-scrollbar-endpad) solid transparent;
  66. }
  67. [data-jp-theme-scrollbars='true']
  68. .CodeMirror-vscrollbar::-webkit-scrollbar-track:vertical {
  69. border-top: var(--jp-scrollbar-endpad) solid transparent;
  70. border-bottom: var(--jp-scrollbar-endpad) solid transparent;
  71. }
  72. /*
  73. * Phosphor
  74. */
  75. .p-ScrollBar[data-orientation='horizontal'] {
  76. min-height: 16px;
  77. max-height: 16px;
  78. min-width: 45px;
  79. border-top: 1px solid #a0a0a0;
  80. }
  81. .p-ScrollBar[data-orientation='vertical'] {
  82. min-width: 16px;
  83. max-width: 16px;
  84. min-height: 45px;
  85. border-left: 1px solid #a0a0a0;
  86. }
  87. .p-ScrollBar-button {
  88. background-color: #f0f0f0;
  89. background-position: center center;
  90. min-height: 15px;
  91. max-height: 15px;
  92. min-width: 15px;
  93. max-width: 15px;
  94. }
  95. .p-ScrollBar-button:hover {
  96. background-color: #dadada;
  97. }
  98. .p-ScrollBar-button.p-mod-active {
  99. background-color: #cdcdcd;
  100. }
  101. .p-ScrollBar-track {
  102. background: #f0f0f0;
  103. }
  104. .p-ScrollBar-thumb {
  105. background: #cdcdcd;
  106. }
  107. .p-ScrollBar-thumb:hover {
  108. background: #bababa;
  109. }
  110. .p-ScrollBar-thumb.p-mod-active {
  111. background: #a0a0a0;
  112. }
  113. .p-ScrollBar[data-orientation='horizontal'] .p-ScrollBar-thumb {
  114. height: 100%;
  115. min-width: 15px;
  116. border-left: 1px solid #a0a0a0;
  117. border-right: 1px solid #a0a0a0;
  118. }
  119. .p-ScrollBar[data-orientation='vertical'] .p-ScrollBar-thumb {
  120. width: 100%;
  121. min-height: 15px;
  122. border-top: 1px solid #a0a0a0;
  123. border-bottom: 1px solid #a0a0a0;
  124. }
  125. .p-ScrollBar[data-orientation='horizontal']
  126. .p-ScrollBar-button[data-action='decrement'] {
  127. background-image: var(--jp-image-caretleft);
  128. }
  129. .p-ScrollBar[data-orientation='horizontal']
  130. .p-ScrollBar-button[data-action='increment'] {
  131. background-image: var(--jp-image-caretright);
  132. }
  133. .p-ScrollBar[data-orientation='vertical']
  134. .p-ScrollBar-button[data-action='decrement'] {
  135. background-image: var(--jp-image-caretup);
  136. }
  137. .p-ScrollBar[data-orientation='vertical']
  138. .p-ScrollBar-button[data-action='increment'] {
  139. background-image: var(--jp-image-caretdown);
  140. }