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 (4600B)


  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. max-width: 9em;
  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. &:not(.active) {
  110. margin-top: 0;
  111. margin-left: 1.5em;
  112. }
  113. @media all and (max-width: 800px) {
  114. padding-left: 0.25em;
  115. padding-right: calc(0.25em + 200px);
  116. margin-right: calc(0.25em - 200px);
  117. margin-left: 0.25em;
  118. &:not(.active) {
  119. margin-top: 0;
  120. margin-left: 0.5em;
  121. }
  122. .text {
  123. display: none;
  124. }
  125. }
  126. }
  127. }
  128. }
  129. .contents {
  130. flex: 1 0 auto;
  131. min-height: 0;
  132. .hidden {
  133. display: none;
  134. }
  135. .full-height:not(.hidden) {
  136. height: 100%;
  137. display: flex;
  138. flex-direction: column;
  139. > *:not(.mobile-label) {
  140. flex: 1;
  141. }
  142. }
  143. &.scrollable-tabs {
  144. overflow-y: auto;
  145. }
  146. }
  147. .tab {
  148. user-select: none;
  149. color: var(--text);
  150. border: none;
  151. cursor: pointer;
  152. box-shadow: var(--shadow);
  153. font-size: 1em;
  154. font-family: var(--font);
  155. border-radius: var(--roundness);
  156. background-color: var(--background);
  157. position: relative;
  158. white-space: nowrap;
  159. padding: 6px 1em;
  160. &:not(.active) {
  161. z-index: 4;
  162. margin-top: 0.25em;
  163. &:hover {
  164. z-index: 6;
  165. }
  166. }
  167. &.active {
  168. background: transparent;
  169. z-index: 5;
  170. }
  171. img {
  172. max-height: 26px;
  173. vertical-align: top;
  174. margin-top: -5px;
  175. }
  176. }
  177. .tabs {
  178. display: flex;
  179. position: relative;
  180. box-sizing: border-box;
  181. &::after,
  182. &::before {
  183. display: block;
  184. flex: 1 1 auto;
  185. }
  186. }
  187. .tab-wrapper {
  188. position: relative;
  189. display: flex;
  190. flex: 0 0 auto;
  191. &:not(.active) {
  192. &::after {
  193. content: "";
  194. position: absolute;
  195. z-index: 7;
  196. }
  197. }
  198. }
  199. .mobile-label {
  200. padding-left: 0.3em;
  201. padding-bottom: 0.25em;
  202. margin-top: 0.5em;
  203. margin-left: 0.2em;
  204. margin-bottom: 0.25em;
  205. border-bottom: 1px solid var(--border);
  206. @media all and (min-width: 800px) {
  207. display: none;
  208. }
  209. }
  210. }
  211. /* stylelint-enable no-descending-specificity */