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


  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: calc(var(--panel-header-height) * 0.2);
  54. --__panel-heading-gap: calc(var(--panel-header-height) * 0.1565);
  55. --__panel-heading-height: var(--panel-header-height);
  56. --__panel-heading-height-inner: calc(var(--__panel-heading-height) - 2 * var(--panel-heading-height-padding, 0));
  57. font-size: calc(var(--panelHeaderSize) / 3.2);
  58. backdrop-filter: var(--__panel-backdrop-filter);
  59. position: relative;
  60. box-sizing: border-box;
  61. display: grid;
  62. grid-auto-flow: column;
  63. grid-template-columns: minmax(50%, 1fr);
  64. grid-auto-columns: auto;
  65. grid-column-gap: var(--__panel-heading-gap);
  66. flex: none;
  67. background-size: cover;
  68. padding: var(--panel-heading-height-padding);
  69. height: var(--__panel-heading-height);
  70. line-height: var(--__panel-heading-height-inner);
  71. z-index: 4;
  72. &.-flexible-height {
  73. --__panel-heading-height: auto;
  74. &::after,
  75. &::before {
  76. display: none;
  77. }
  78. }
  79. &.-stub {
  80. &,
  81. &::after {
  82. border-radius: var(--roundness);
  83. }
  84. }
  85. &.-sticky {
  86. position: sticky;
  87. top: var(--navbar-height);
  88. }
  89. &::after,
  90. &::before {
  91. content: "";
  92. position: absolute;
  93. top: 0;
  94. bottom: 0;
  95. right: 0;
  96. left: 0;
  97. pointer-events: none;
  98. }
  99. .title {
  100. font-size: 1.3em;
  101. }
  102. .alert {
  103. white-space: nowrap;
  104. text-overflow: ellipsis;
  105. overflow-x: hidden;
  106. }
  107. &:not(.-flexible-height) {
  108. > .button-default,
  109. > .alert {
  110. height: var(--__panel-heading-height-inner);
  111. min-height: 0;
  112. box-sizing: border-box;
  113. margin: 0;
  114. min-width: 1px;
  115. padding-top: 0;
  116. padding-bottom: 0;
  117. align-self: stretch;
  118. }
  119. > .alert {
  120. line-height: calc(var(--__panel-heading-height-inner) - 2px);
  121. }
  122. }
  123. }
  124. // TODO Should refactor panels into separate component and utilize slots
  125. .panel-heading {
  126. border-radius: var(--roundness) var(--roundness) 0 0;
  127. border-width: 0 0 1px;
  128. align-items: start;
  129. background-image:
  130. linear-gradient(to bottom, var(--background), var(--background)),
  131. linear-gradient(to bottom, var(--__panel-background), var(--__panel-background));
  132. &::after {
  133. background-color: var(--background);
  134. z-index: -2;
  135. border-radius: var(--roundness) var(--roundness) 0 0;
  136. box-shadow: var(--shadow);
  137. }
  138. &:not(.-flexible-height) {
  139. > .button-default {
  140. flex-shrink: 0;
  141. }
  142. }
  143. .rightside-button {
  144. align-self: stretch;
  145. text-align: center;
  146. width: var(--__panel-heading-height);
  147. height: var(--__panel-heading-height);
  148. margin: calc(-1 * var(--panel-heading-height-padding)) 0;
  149. margin-right: calc(-1 * var(--__panel-heading-gap));
  150. > button {
  151. box-sizing: border-box;
  152. padding: calc(1 * var(--panel-heading-height-padding)) 0;
  153. height: 100%;
  154. width: 100%;
  155. text-align: center;
  156. svg {
  157. font-size: 1.2em;
  158. }
  159. }
  160. }
  161. .rightside-icon {
  162. align-self: stretch;
  163. text-align: center;
  164. width: var(--__panel-heading-height);
  165. margin-right: calc(-1 * var(--__panel-heading-gap));
  166. svg {
  167. font-size: 1.2em;
  168. }
  169. }
  170. }
  171. .panel-footer {
  172. border-top-left-radius: 0;
  173. border-top-right-radius: 0;
  174. align-items: center;
  175. border-width: 1px 0 0;
  176. border-style: solid;
  177. border-color: var(--border);
  178. background-color: var(--__panel-background);
  179. }
  180. /* stylelint-enable no-descending-specificity */