tabs.less 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. /*-----------------------------------------------------------------------------
  2. | Copyright (c) Jupyter Development Team.
  3. | Distributed under the terms of the Modified BSD License.
  4. |----------------------------------------------------------------------------*/
  5. /*-----------------------------------------------------------------------------
  6. | Variables
  7. |----------------------------------------------------------------------------*/
  8. .p-TabBar {
  9. --jp-private-horizontal-tab-height: 24px;
  10. --jp-private-horizontal-tab-width: 144px;
  11. }
  12. /*-----------------------------------------------------------------------------
  13. | TabBar
  14. |----------------------------------------------------------------------------*/
  15. .p-TabBar {
  16. overflow: visible;
  17. color: var(--jp-ui-font-color1);
  18. font-size: var(--jp-ui-fontSize1);
  19. }
  20. .p-TabBar.p-mod-horizontal {
  21. min-height: var(--jp-private-horizontal-tab-height);
  22. }
  23. .p-TabBar.p-mod-vertical {
  24. min-width: 80px;
  25. }
  26. .p-TabBar.p-mod-top {
  27. border-bottom: var(--jp-borderWidth) solid var(--jp-borderColor1);
  28. }
  29. .p-TabBar.p-mod-bottom {
  30. border-top: var(--jp-borderWidth) solid var(--jp-borderColor1);
  31. }
  32. .p-TabBar.p-mod-left {
  33. border-right: var(--jp-borderWidth) solid var(--jp-borderColor1);
  34. }
  35. .p-TabBar.p-mod-right {
  36. border-left: var(--jp-borderWidth) solid var(--jp-borderColor1);
  37. }
  38. .p-TabBar-content {
  39. min-width: 0;
  40. min-height: 0;
  41. }
  42. .p-TabBar.p-mod-top > .p-TabBar-content {
  43. align-items: flex-end;
  44. }
  45. .p-TabBar.p-mod-bottom > .p-TabBar-content {
  46. align-items: flex-start;
  47. }
  48. .p-TabBar-tab {
  49. padding: 0px 10px;
  50. background: var(--jp-layout-color2);
  51. border: var(--jp-borderWidth) solid var(--jp-borderColor1);
  52. }
  53. .p-TabBar-tab.p-mod-current {
  54. background: var(--jp-layout-color1);
  55. }
  56. .p-TabBar-tab:hover:not(.p-mod-current) {
  57. background: var(--jp-layout-color1);
  58. }
  59. .p-TabBar.p-mod-top .p-TabBar-tab,
  60. .p-TabBar.p-mod-bottom .p-TabBar-tab {
  61. flex: 0 1 var(--jp-private-horizontal-tab-width);
  62. min-height: calc(var(--jp-private-horizontal-tab-height) - 2*var(--jp-borderWidth));
  63. // For some reason Firefox needs us to give a max-height as well...
  64. max-height: calc(var(--jp-private-horizontal-tab-height) - 2*var(--jp-borderWidth));
  65. min-width: 35px;
  66. margin-left: calc(-1*var(--jp-borderWidth));
  67. line-height: calc(var(--jp-private-horizontal-tab-height) - 3*var(--jp-borderWidth));
  68. }
  69. .p-TabBar.p-mod-top .p-TabBar-tab {
  70. border-bottom: none;
  71. }
  72. .p-TabBar.p-mod-bottom .p-TabBar-tab {
  73. border-top: none;
  74. }
  75. .p-TabBar.p-mod-top .p-TabBar-tab:first-child,
  76. .p-TabBar.p-mod-bottom .p-TabBar-tab:first-child {
  77. margin-left: 0;
  78. }
  79. .p-TabBar.p-mod-top .p-TabBar-tab.p-mod-current,
  80. .p-TabBar.p-mod-bottom .p-TabBar-tab.p-mod-current {
  81. min-height: calc(var(--jp-private-horizontal-tab-height) - var(--jp-borderWidth));
  82. }
  83. .p-TabBar.p-mod-top .p-TabBar-tab.p-mod-current {
  84. transform: translateY(var(--jp-borderWidth));
  85. }
  86. .p-TabBar.p-mod-bottom .p-TabBar-tab.p-mod-current {
  87. transform: translateY(-1*var(--jp-borderWidth));
  88. }
  89. .p-TabBar.p-mod-left .p-TabBar-tab,
  90. .p-TabBar.p-mod-right .p-TabBar-tab {
  91. flex: 0 1 40px;
  92. margin-top: -1px;
  93. line-height: 40px;
  94. }
  95. .p-TabBar.p-mod-left .p-TabBar-tab {
  96. border-right: none;
  97. }
  98. .p-TabBar.p-mod-right .p-TabBar-tab {
  99. border-left: none;
  100. }
  101. .p-TabBar.p-mod-left .p-TabBar-tab:first-child,
  102. .p-TabBar.p-mod-right .p-TabBar-tab:first-child {
  103. margin-top: 0;
  104. }
  105. .p-TabBar.p-mod-left .p-TabBar-tab.p-mod-current,
  106. .p-TabBar.p-mod-right .p-TabBar-tab.p-mod-current {
  107. min-width: 80px;
  108. max-width: 80px;
  109. }
  110. .p-TabBar.p-mod-right .p-TabBar-tab.p-mod-current {
  111. transform: translateX(-1px);
  112. }
  113. .p-TabBar-tabIcon,
  114. .p-TabBar-tabLabel,
  115. .p-TabBar-tabCloseIcon {
  116. display: inline-block;
  117. }
  118. .p-TabBar-tab.p-mod-closable > .p-TabBar-tabCloseIcon {
  119. margin-left: 4px;
  120. }
  121. .p-TabBar-tab.p-mod-closable > .p-TabBar-tabCloseIcon:before {
  122. content: '\f00d'; /* close */
  123. font-family: FontAwesome;
  124. }
  125. .p-TabBar-tab.p-mod-closable.jp-mod-dirty > .p-TabBar-tabCloseIcon:before {
  126. font-family: FontAwesome;
  127. content: '\f111'; /* circle */
  128. font-size: 10px;
  129. }
  130. .p-TabBar-tab.p-mod-drag-image {
  131. min-height: var(--jp-private-horizontal-tab-height);
  132. min-width: var(--jp-private-horizontal-tab-width);
  133. line-height: var(--jp-private-horizontal-tab-height);
  134. color: var(--jp-ui-font-color1);
  135. background: var(--jp-layout-color1);
  136. border: var(--jp-borderWidth) solid var(--jp-borderColor1);
  137. border-top: var(--jp-borderWidth) solid var(--jp-brand-color1);
  138. font-size: var(--jp-ui-fontSize1);
  139. box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  140. transform: translateX(-40%) translateY(-58%);
  141. }
  142. /*-----------------------------------------------------------------------------
  143. | TabPanel
  144. |----------------------------------------------------------------------------*/
  145. .p-TabPanel-stackedPanel {
  146. padding: 0px;
  147. background: var(--jp-dockpanel-content-background);
  148. border: var(--jp-borderWidth) solid #C0C0C0;
  149. // This shadow requires a bottom/right padding on the .p-DockPanel-tabPanel
  150. box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  151. }
  152. .p-TabPanel.p-mod-top-to-bottom > .p-TabPanel-stackedPanel {
  153. border-top: none;
  154. }
  155. .p-TabPanel.p-mod-bottom-to-top > .p-TabPanel-stackedPanel {
  156. border-bottom: none;
  157. }
  158. .p-TabPanel.p-mod-left-to-right > .p-TabPanel-stackedPanel {
  159. border-left: none;
  160. }
  161. .p-TabPanel.p-mod-right-to-left > .p-TabPanel-stackedPanel {
  162. border-right: none;
  163. }