logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/

tab_switcher.scss (4385B)


  1. /* stylelint-disable no-descending-specificity */
  2. .tab-switcher {
  3. display: flex;
  4. .tab-icon {
  5. margin: 0.2em auto;
  6. display: block;
  7. }
  8. &.top-tabs {
  9. flex-direction: column;
  10. > .tabs {
  11. width: 100%;
  12. overflow-y: hidden;
  13. overflow-x: auto;
  14. padding-top: 5px;
  15. flex-direction: row;
  16. flex: 0 0 auto;
  17. &::after,
  18. &::before {
  19. content: "";
  20. flex: 1 1 auto;
  21. border-bottom: 1px solid;
  22. border-bottom-color: var(--border);
  23. }
  24. .tab-wrapper {
  25. height: 2em;
  26. &:not(.active)::after {
  27. left: 0;
  28. right: 0;
  29. bottom: 0;
  30. border-bottom: 1px solid;
  31. border-bottom-color: var(--border);
  32. }
  33. }
  34. .tab {
  35. width: 100%;
  36. min-width: 1px;
  37. border-bottom-left-radius: 0;
  38. border-bottom-right-radius: 0;
  39. padding-bottom: 99px;
  40. margin-bottom: 6px - 99px;
  41. }
  42. }
  43. .contents.scrollable-tabs {
  44. flex-basis: 0;
  45. }
  46. }
  47. &.side-tabs {
  48. flex-direction: row;
  49. @media all and (max-width: 800px) {
  50. overflow-x: auto;
  51. }
  52. > .contents {
  53. flex: 1 1 auto;
  54. }
  55. > .tabs {
  56. flex: 0 0 auto;
  57. overflow-y: auto;
  58. overflow-x: hidden;
  59. flex-direction: column;
  60. &::after,
  61. &::before {
  62. flex-shrink: 0;
  63. flex-basis: 0.5em;
  64. content: "";
  65. border-right: 1px solid;
  66. border-right-color: var(--border);
  67. }
  68. &::after {
  69. flex-grow: 1;
  70. }
  71. &::before {
  72. flex-grow: 0;
  73. }
  74. .tab-wrapper {
  75. min-width: 10em;
  76. display: flex;
  77. flex-direction: column;
  78. @media all and (max-width: 800px) {
  79. min-width: 4em;
  80. }
  81. &:not(.active)::after {
  82. top: 0;
  83. right: 0;
  84. bottom: 0;
  85. border-right: 1px solid;
  86. border-right-color: var(--border);
  87. }
  88. &::before {
  89. flex: 0 0 6px;
  90. content: "";
  91. border-right: 1px solid;
  92. border-right-color: var(--border);
  93. }
  94. &:last-child .tab {
  95. margin-bottom: 0;
  96. }
  97. }
  98. .tab {
  99. flex: 1;
  100. box-sizing: content-box;
  101. min-width: 10em;
  102. min-width: 1px;
  103. border-top-right-radius: 0;
  104. border-bottom-right-radius: 0;
  105. padding-left: 1em;
  106. padding-right: calc(1em + 200px);
  107. margin-right: -200px;
  108. margin-left: 1em;
  109. @media all and (max-width: 800px) {
  110. padding-left: 0.25em;
  111. padding-right: calc(0.25em + 200px);
  112. margin-right: calc(0.25em - 200px);
  113. margin-left: 0.25em;
  114. .text {
  115. display: none;
  116. }
  117. }
  118. }
  119. }
  120. }
  121. .contents {
  122. flex: 1 0 auto;
  123. min-height: 0;
  124. .hidden {
  125. display: none;
  126. }
  127. .full-height:not(.hidden) {
  128. height: 100%;
  129. display: flex;
  130. flex-direction: column;
  131. > *:not(.mobile-label) {
  132. flex: 1;
  133. }
  134. }
  135. &.scrollable-tabs {
  136. overflow-y: auto;
  137. }
  138. }
  139. .tab {
  140. user-select: none;
  141. color: var(--text);
  142. border: none;
  143. cursor: pointer;
  144. box-shadow: var(--shadow);
  145. font-size: 1em;
  146. font-family: var(--font);
  147. border-radius: var(--roundness);
  148. background-color: var(--background);
  149. position: relative;
  150. white-space: nowrap;
  151. padding: 6px 1em;
  152. &:not(.active) {
  153. z-index: 4;
  154. &:hover {
  155. z-index: 6;
  156. }
  157. }
  158. &.active {
  159. background: transparent;
  160. z-index: 5;
  161. }
  162. img {
  163. max-height: 26px;
  164. vertical-align: top;
  165. margin-top: -5px;
  166. }
  167. }
  168. .tabs {
  169. display: flex;
  170. position: relative;
  171. box-sizing: border-box;
  172. &::after,
  173. &::before {
  174. display: block;
  175. flex: 1 1 auto;
  176. }
  177. }
  178. .tab-wrapper {
  179. position: relative;
  180. display: flex;
  181. flex: 0 0 auto;
  182. &:not(.active) {
  183. &::after {
  184. content: "";
  185. position: absolute;
  186. z-index: 7;
  187. }
  188. }
  189. }
  190. .mobile-label {
  191. padding-left: 0.3em;
  192. padding-bottom: 0.25em;
  193. margin-top: 0.5em;
  194. margin-left: 0.2em;
  195. margin-bottom: 0.25em;
  196. border-bottom: 1px solid var(--border);
  197. @media all and (min-width: 800px) {
  198. display: none;
  199. }
  200. }
  201. }
  202. /* stylelint-enable no-descending-specificity */