logo

pleroma-fe

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

panel.scss (4385B)


  1. /* stylelint-disable no-descending-specificity */
  2. .panel {
  3. --__panel-background: var(--background);
  4. --__panel-backdrop-filter: var(--backdrop-filter);
  5. .tab-switcher .tabs {
  6. background: var(--__panel-background);
  7. backdrop-filter: var(--__panel-backdrop-filter);
  8. }
  9. position: relative;
  10. display: flex;
  11. flex-direction: column;
  12. .panel-heading {
  13. background-color: inherit;
  14. }
  15. &::after,
  16. & {
  17. border-radius: var(--roundness);
  18. }
  19. &::after {
  20. content: "";
  21. position: absolute;
  22. top: 0;
  23. bottom: 0;
  24. left: 0;
  25. right: 0;
  26. z-index: 5;
  27. box-shadow: var(--shadow);
  28. pointer-events: none;
  29. }
  30. }
  31. .panel-body {
  32. padding: var(--panel-body-padding, 0);
  33. background: var(--background);
  34. backdrop-filter: var(--__panel-backdrop-filter);
  35. .tab-switcher .tabs {
  36. background: none;
  37. backdrop-filter: none;
  38. }
  39. &:empty::before {
  40. content: "¯\\_(ツ)_/¯"; // Could use words but it'd require translations
  41. display: block;
  42. padding: 1em;
  43. text-align: center;
  44. }
  45. > p {
  46. line-height: 1.3;
  47. padding: 1em;
  48. margin: 0;
  49. }
  50. }
  51. .panel-heading,
  52. .panel-footer {
  53. --panel-heading-height-padding: 0.6em;
  54. --__panel-heading-gap: 0.5em;
  55. --__panel-heading-height: 3.2em;
  56. --__panel-heading-height-inner: calc(var(--__panel-heading-height) - 2 * var(--panel-heading-height-padding, 0));
  57. backdrop-filter: var(--__panel-backdrop-filter);
  58. position: relative;
  59. box-sizing: border-box;
  60. display: grid;
  61. grid-auto-flow: column;
  62. grid-template-columns: minmax(50%, 1fr);
  63. grid-auto-columns: auto;
  64. grid-column-gap: var(--__panel-heading-gap);
  65. flex: none;
  66. background-size: cover;
  67. padding: var(--panel-heading-height-padding);
  68. height: var(--__panel-heading-height);
  69. line-height: var(--__panel-heading-height-inner);
  70. z-index: 4;
  71. &.-flexible-height {
  72. --__panel-heading-height: auto;
  73. &::after,
  74. &::before {
  75. display: none;
  76. }
  77. }
  78. &.-stub {
  79. &,
  80. &::after {
  81. border-radius: var(--roundness);
  82. }
  83. }
  84. &.-sticky {
  85. position: sticky;
  86. top: var(--navbar-height);
  87. }
  88. &::after,
  89. &::before {
  90. content: "";
  91. position: absolute;
  92. top: 0;
  93. bottom: 0;
  94. right: 0;
  95. left: 0;
  96. pointer-events: none;
  97. }
  98. .title {
  99. font-size: 1.3em;
  100. }
  101. .alert {
  102. white-space: nowrap;
  103. text-overflow: ellipsis;
  104. overflow-x: hidden;
  105. }
  106. &:not(.-flexible-height) {
  107. > .button-default,
  108. > .alert {
  109. height: var(--__panel-heading-height-inner);
  110. min-height: 0;
  111. box-sizing: border-box;
  112. margin: 0;
  113. min-width: 1px;
  114. padding-top: 0;
  115. padding-bottom: 0;
  116. align-self: stretch;
  117. }
  118. > .alert {
  119. line-height: calc(var(--__panel-heading-height-inner) - 2px);
  120. }
  121. }
  122. }
  123. // TODO Should refactor panels into separate component and utilize slots
  124. .panel-heading {
  125. border-radius: var(--roundness) var(--roundness) 0 0;
  126. border-width: 0 0 1px;
  127. align-items: start;
  128. background-image:
  129. linear-gradient(to bottom, var(--background), var(--background)),
  130. linear-gradient(to bottom, var(--__panel-background), var(--__panel-background));
  131. &::after {
  132. background-color: var(--background);
  133. z-index: -2;
  134. border-radius: var(--roundness) var(--roundness) 0 0;
  135. box-shadow: var(--shadow);
  136. }
  137. &:not(.-flexible-height) {
  138. > .button-default {
  139. flex-shrink: 0;
  140. }
  141. }
  142. .rightside-button {
  143. align-self: stretch;
  144. text-align: center;
  145. width: var(--__panel-heading-height);
  146. height: var(--__panel-heading-height);
  147. margin: calc(-1 * var(--panel-heading-height-padding)) 0;
  148. margin-right: calc(-1 * var(--__panel-heading-gap));
  149. > button {
  150. box-sizing: border-box;
  151. padding: calc(1 * var(--panel-heading-height-padding)) 0;
  152. height: 100%;
  153. width: 100%;
  154. text-align: center;
  155. svg {
  156. font-size: 1.2em;
  157. }
  158. }
  159. }
  160. .rightside-icon {
  161. align-self: stretch;
  162. text-align: center;
  163. width: var(--__panel-heading-height);
  164. margin-right: calc(-1 * var(--__panel-heading-gap));
  165. svg {
  166. font-size: 1.2em;
  167. }
  168. }
  169. }
  170. .panel-footer {
  171. border-top-left-radius: 0;
  172. border-top-right-radius: 0;
  173. align-items: center;
  174. border-width: 1px 0 0;
  175. border-style: solid;
  176. border-color: var(--border);
  177. background-color: var(--__panel-background);
  178. }
  179. /* stylelint-enable no-descending-specificity */