tabs.less 4.6 KB

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