logo

pleroma-fe

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

panel.scss (4564B)


  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. margin: 0;
  102. font-weight: normal;
  103. }
  104. .alert {
  105. white-space: nowrap;
  106. text-overflow: ellipsis;
  107. overflow-x: hidden;
  108. }
  109. &:not(.-flexible-height) {
  110. > .button-default,
  111. > .alert {
  112. height: var(--__panel-heading-height-inner);
  113. min-height: 0;
  114. box-sizing: border-box;
  115. margin: 0;
  116. min-width: 1px;
  117. padding-top: 0;
  118. padding-bottom: 0;
  119. align-self: stretch;
  120. }
  121. > .alert {
  122. line-height: calc(var(--__panel-heading-height-inner) - 2px);
  123. }
  124. }
  125. }
  126. // TODO Should refactor panels into separate component and utilize slots
  127. .panel-heading {
  128. border-radius: var(--roundness) var(--roundness) 0 0;
  129. border-width: 0 0 1px;
  130. align-items: start;
  131. background-image:
  132. linear-gradient(to bottom, var(--background), var(--background)),
  133. linear-gradient(to bottom, var(--__panel-background), var(--__panel-background));
  134. &::after {
  135. background-color: var(--background);
  136. z-index: -2;
  137. border-radius: var(--roundness) var(--roundness) 0 0;
  138. box-shadow: var(--shadow);
  139. }
  140. &:not(.-flexible-height) {
  141. > .button-default {
  142. flex-shrink: 0;
  143. }
  144. }
  145. .rightside-button {
  146. align-self: stretch;
  147. text-align: center;
  148. width: var(--__panel-heading-height);
  149. height: var(--__panel-heading-height);
  150. margin: calc(-1 * var(--panel-heading-height-padding)) 0;
  151. margin-right: calc(-1 * var(--__panel-heading-gap));
  152. > button {
  153. box-sizing: border-box;
  154. padding: calc(1 * var(--panel-heading-height-padding)) 0;
  155. height: 100%;
  156. width: 100%;
  157. text-align: center;
  158. svg {
  159. font-size: 1.2em;
  160. }
  161. }
  162. }
  163. .rightside-icon {
  164. align-self: stretch;
  165. text-align: center;
  166. width: var(--__panel-heading-height);
  167. margin-right: calc(-1 * var(--__panel-heading-gap));
  168. svg {
  169. font-size: 1.2em;
  170. }
  171. }
  172. }
  173. .panel-footer {
  174. border-top-left-radius: 0;
  175. border-top-right-radius: 0;
  176. align-items: center;
  177. border-width: 1px 0 0;
  178. border-style: solid;
  179. border-color: var(--border);
  180. background-color: var(--__panel-background);
  181. }
  182. /* stylelint-enable no-descending-specificity */