logo

pleroma-fe

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

App.scss (18446B)


  1. // stylelint-disable rscss/class-format
  2. /* stylelint-disable no-descending-specificity */
  3. @import "./panel";
  4. :root {
  5. --status-margin: 0.75em;
  6. --post-line-height: 1.4;
  7. // Z-Index stuff
  8. --ZI_media_modal: 9000;
  9. --ZI_modals_popovers: 8500;
  10. --ZI_modals: 8000;
  11. --ZI_navbar_popovers: 7500;
  12. --ZI_navbar: 7000;
  13. --ZI_popovers: 6000;
  14. // Fallback for when stuff is loading
  15. --background: var(--bg);
  16. }
  17. html {
  18. font-size: var(--textSize, 14px);
  19. --navbar-height: var(--navbarSize, 3.5rem);
  20. --emoji-size: var(--emojiSize, 32px);
  21. --panel-header-height: var(--panelHeaderSize, 3.2rem);
  22. // overflow-x: clip causes my browser's tab to crash with SIGILL lul
  23. }
  24. body {
  25. font-family: sans-serif;
  26. font-family: var(--font);
  27. margin: 0;
  28. color: var(--text);
  29. -webkit-font-smoothing: antialiased;
  30. -moz-osx-font-smoothing: grayscale;
  31. overscroll-behavior-y: none;
  32. overflow-x: clip;
  33. overflow-y: scroll;
  34. &.hidden {
  35. display: none;
  36. }
  37. }
  38. // ## Custom scrollbars
  39. // Only show custom scrollbars on devices which
  40. // have a cursor/pointer to operate them
  41. @media (any-pointer: fine) {
  42. * {
  43. scrollbar-color: var(--fg) transparent;
  44. &::-webkit-scrollbar {
  45. background: transparent;
  46. }
  47. &::-webkit-scrollbar-corner {
  48. background: transparent;
  49. }
  50. &::-webkit-resizer {
  51. /* stylelint-disable-next-line declaration-no-important */
  52. background-color: transparent !important;
  53. background-image:
  54. linear-gradient(
  55. 135deg,
  56. transparent calc(50% - 1px),
  57. var(--textFaint) 50%,
  58. transparent calc(50% + 1px),
  59. transparent calc(75% - 1px),
  60. var(--textFaint) 75%,
  61. transparent calc(75% + 1px),
  62. );
  63. }
  64. &::-webkit-scrollbar-button,
  65. &::-webkit-scrollbar-thumb {
  66. box-shadow: var(--shadow);
  67. border-radius: var(--roundness);
  68. }
  69. // horizontal/vertical/increment/decrement are webkit-specific stuff
  70. // that indicates whether we're affecting vertical scrollbar, increase button etc
  71. // stylelint-disable selector-pseudo-class-no-unknown
  72. &::-webkit-scrollbar-button {
  73. --___bgPadding: 2px;
  74. color: var(--text);
  75. background-repeat: no-repeat, no-repeat;
  76. &:horizontal {
  77. background-size: 50% calc(50% - var(--___bgPadding)), 50% calc(50% - var(--___bgPadding));
  78. &:increment {
  79. background-image:
  80. linear-gradient(45deg, var(--text) 50%, transparent 51%),
  81. linear-gradient(-45deg, transparent 50%, var(--text) 51%);
  82. background-position: top var(--___bgPadding) left 50%, right 50% bottom var(--___bgPadding);
  83. }
  84. &:decrement {
  85. background-image:
  86. linear-gradient(45deg, transparent 50%, var(--text) calc(50% + 1px)),
  87. linear-gradient(-45deg, var(--text) 50%, transparent 51%);
  88. background-position: bottom var(--___bgPadding) right 50%, left 50% top var(--___bgPadding);
  89. }
  90. }
  91. &:vertical {
  92. background-size: calc(50% - var(--___bgPadding)) 50%, calc(50% - var(--___bgPadding)) 50%;
  93. &:increment {
  94. background-image:
  95. linear-gradient(-45deg, transparent 50%, var(--text) 51%),
  96. linear-gradient(45deg, transparent 50%, var(--text) 51%);
  97. background-position: right var(--___bgPadding) top 50%, left var(--___bgPadding) top 50%;
  98. }
  99. &:decrement {
  100. background-image:
  101. linear-gradient(-45deg, var(--text) 50%, transparent 51%),
  102. linear-gradient(45deg, var(--text) 50%, transparent 51%);
  103. background-position: left var(--___bgPadding) top 50%, right var(--___bgPadding) top 50%;
  104. }
  105. }
  106. }
  107. // stylelint-enable selector-pseudo-class-no-unknown
  108. }
  109. // Body should have background to scrollbar otherwise it will use white (body color?)
  110. html {
  111. scrollbar-color: var(--fg) var(--wallpaper);
  112. background: var(--wallpaper);
  113. }
  114. }
  115. a {
  116. text-decoration: none;
  117. color: var(--link);
  118. }
  119. h4 {
  120. margin: 0;
  121. }
  122. .iconLetter {
  123. display: inline-block;
  124. text-align: center;
  125. font-weight: 1000;
  126. }
  127. i[class*="icon-"],
  128. .svg-inline--fa,
  129. .iconLetter {
  130. color: var(--icon);
  131. }
  132. nav {
  133. z-index: var(--ZI_navbar);
  134. box-shadow: var(--shadow);
  135. box-sizing: border-box;
  136. height: var(--navbar-height);
  137. font-size: calc(var(--navbar-height) / 3.5);
  138. position: fixed;
  139. }
  140. #sidebar {
  141. grid-area: sidebar;
  142. }
  143. #modal {
  144. position: absolute;
  145. z-index: var(--ZI_modals);
  146. }
  147. .column.-scrollable {
  148. top: var(--navbar-height);
  149. position: sticky;
  150. }
  151. #main-scroller {
  152. grid-area: content;
  153. position: relative;
  154. }
  155. #notifs-column {
  156. grid-area: notifs;
  157. }
  158. .app-bg-wrapper {
  159. position: fixed;
  160. height: 100%;
  161. top: var(--navbar-height);
  162. z-index: -1000;
  163. left: 0;
  164. right: -20px;
  165. background-size: cover;
  166. background-repeat: no-repeat;
  167. background-color: var(--wallpaper);
  168. background-image: var(--body-background-image);
  169. background-position: 50%;
  170. }
  171. .underlay {
  172. grid-column: 1 / span 3;
  173. grid-row: 1 / 1;
  174. pointer-events: none;
  175. background-color: var(--underlay);
  176. z-index: -1000;
  177. }
  178. .app-layout {
  179. --miniColumn: 25rem;
  180. --maxiColumn: 45rem;
  181. --columnGap: 1rem;
  182. --effectiveSidebarColumnWidth: minmax(var(--miniColumn), var(--sidebarColumnWidth, var(--miniColumn)));
  183. --effectiveNotifsColumnWidth: minmax(var(--miniColumn), var(--notifsColumnWidth, var(--miniColumn)));
  184. --effectiveContentColumnWidth: minmax(var(--miniColumn), var(--contentColumnWidth, var(--maxiColumn)));
  185. position: relative;
  186. display: grid;
  187. grid-template-columns:
  188. var(--effectiveSidebarColumnWidth)
  189. var(--effectiveContentColumnWidth);
  190. grid-template-areas: "sidebar content";
  191. grid-template-rows: 1fr;
  192. box-sizing: border-box;
  193. margin: 0 auto;
  194. align-content: flex-start;
  195. flex-wrap: wrap;
  196. justify-content: center;
  197. min-height: 100vh;
  198. overflow-x: clip;
  199. .column {
  200. --___columnMargin: var(--columnGap);
  201. display: grid;
  202. grid-template-columns: 100%;
  203. box-sizing: border-box;
  204. grid-row: 1 / 1;
  205. margin: 0 calc(var(--___columnMargin) / 2);
  206. padding: calc(var(--___columnMargin)) 0;
  207. row-gap: var(--___columnMargin);
  208. align-content: start;
  209. &:not(.-scrollable) {
  210. margin-top: var(--navbar-height);
  211. }
  212. &:hover {
  213. z-index: 2;
  214. }
  215. &.-full-height {
  216. margin-bottom: 0;
  217. padding-top: 0;
  218. padding-bottom: 0;
  219. }
  220. &.-scrollable {
  221. --___paddingIncrease: calc(var(--columnGap) / 2);
  222. position: sticky;
  223. top: var(--navbar-height);
  224. max-height: calc(100vh - var(--navbar-height));
  225. overflow-y: auto;
  226. overflow-x: hidden;
  227. margin-left: calc(var(--___paddingIncrease) * -1);
  228. padding-left: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2);
  229. // On browsers that don't support hiding scrollbars we enforce "show scrolbars" mode
  230. // might implement old style of hiding scrollbars later if there's demand
  231. @supports (scrollbar-width: none) or (-webkit-text-fill-color: initial) {
  232. &:not(.-show-scrollbar) {
  233. scrollbar-width: none;
  234. margin-right: calc(var(--___paddingIncrease) * -1);
  235. padding-right: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2);
  236. &::-webkit-scrollbar {
  237. display: block;
  238. width: 0;
  239. }
  240. }
  241. }
  242. .panel-heading.-sticky {
  243. top: calc(var(--columnGap) / -1);
  244. }
  245. }
  246. }
  247. &.-has-new-post-button {
  248. .column {
  249. padding-bottom: 10rem;
  250. }
  251. }
  252. &.-no-sticky-headers {
  253. .column {
  254. .panel-heading.-sticky {
  255. position: relative;
  256. top: 0;
  257. }
  258. }
  259. }
  260. .column-inner {
  261. display: grid;
  262. grid-template-columns: 100%;
  263. box-sizing: border-box;
  264. row-gap: 1em;
  265. align-content: start;
  266. }
  267. &.-reverse:not(.-wide, .-mobile) {
  268. grid-template-columns:
  269. var(--effectiveContentColumnWidth)
  270. var(--effectiveSidebarColumnWidth);
  271. grid-template-areas: "content sidebar";
  272. }
  273. &.-wide {
  274. grid-template-columns:
  275. var(--effectiveSidebarColumnWidth)
  276. var(--effectiveContentColumnWidth)
  277. var(--effectiveNotifsColumnWidth);
  278. grid-template-areas: "sidebar content notifs";
  279. &.-reverse {
  280. grid-template-columns:
  281. var(--effectiveNotifsColumnWidth)
  282. var(--effectiveContentColumnWidth)
  283. var(--effectiveSidebarColumnWidth);
  284. grid-template-areas: "notifs content sidebar";
  285. }
  286. }
  287. &.-mobile {
  288. grid-template-columns: 100vw;
  289. grid-template-areas: "content";
  290. padding: 0;
  291. .column {
  292. padding-top: 0;
  293. margin: var(--navbar-height) 0 0 0;
  294. }
  295. .panel-heading,
  296. .panel-heading::after,
  297. .panel-heading::before,
  298. .panel,
  299. .panel::after {
  300. border-top-left-radius: 0;
  301. border-top-right-radius: 0;
  302. }
  303. #sidebar,
  304. #notifs-column {
  305. display: none;
  306. }
  307. }
  308. &.-normal {
  309. #notifs-column {
  310. display: none;
  311. }
  312. }
  313. }
  314. .text-center {
  315. text-align: center;
  316. }
  317. .button-default {
  318. user-select: none;
  319. color: var(--text);
  320. border: none;
  321. cursor: pointer;
  322. background-color: var(--background);
  323. box-shadow: var(--shadow);
  324. font-size: 1em;
  325. font-family: sans-serif;
  326. font-family: var(--font);
  327. &::-moz-focus-inner {
  328. border: none;
  329. }
  330. &:disabled {
  331. cursor: not-allowed;
  332. }
  333. }
  334. .menu-item,
  335. .list-item {
  336. display: block;
  337. box-sizing: border-box;
  338. border: none;
  339. outline: none;
  340. text-align: initial;
  341. font-size: inherit;
  342. font-family: inherit;
  343. font-weight: 400;
  344. cursor: pointer;
  345. color: inherit;
  346. clear: both;
  347. position: relative;
  348. white-space: nowrap;
  349. border-color: var(--border);
  350. border-style: solid;
  351. border-width: 0;
  352. border-top-width: 1px;
  353. width: 100%;
  354. line-height: var(--__line-height);
  355. padding: var(--__vertical-gap) var(--__horizontal-gap);
  356. background: transparent;
  357. --__line-height: 1.5em;
  358. --__horizontal-gap: 0.75em;
  359. --__vertical-gap: 0.5em;
  360. &.-non-interactive {
  361. cursor: auto;
  362. }
  363. &.-active,
  364. &:hover {
  365. border-top-width: 1px;
  366. border-bottom-width: 1px;
  367. }
  368. &.-active + &,
  369. &:hover + & {
  370. border-top-width: 0;
  371. }
  372. &:hover + .menu-item-collapsible:not(.-expanded) + &,
  373. &.-active + .menu-item-collapsible:not(.-expanded) + & {
  374. border-top-width: 0;
  375. }
  376. &[aria-expanded="true"] {
  377. border-bottom-width: 1px;
  378. }
  379. a,
  380. button:not(.button-default) {
  381. text-align: initial;
  382. padding: 0;
  383. background: none;
  384. border: none;
  385. outline: none;
  386. display: inline;
  387. font-size: 100%;
  388. font-family: inherit;
  389. line-height: unset;
  390. color: var(--text);
  391. }
  392. &:first-child {
  393. border-top-right-radius: var(--roundness);
  394. border-top-left-radius: var(--roundness);
  395. border-top-width: 0;
  396. }
  397. &:last-child {
  398. border-bottom-right-radius: var(--roundness);
  399. border-bottom-left-radius: var(--roundness);
  400. border-bottom-width: 0;
  401. }
  402. }
  403. .button-unstyled {
  404. border: none;
  405. outline: none;
  406. display: inline;
  407. text-align: initial;
  408. font-size: 100%;
  409. font-family: inherit;
  410. box-shadow: var(--shadow);
  411. background-color: transparent;
  412. padding: 0;
  413. line-height: unset;
  414. cursor: pointer;
  415. box-sizing: content-box;
  416. color: inherit;
  417. &.-link {
  418. /* stylelint-disable-next-line declaration-no-important */
  419. color: var(--link) !important;
  420. }
  421. }
  422. input,
  423. textarea {
  424. border: none;
  425. display: inline-block;
  426. outline: none;
  427. }
  428. .input {
  429. &.unstyled {
  430. border-radius: 0;
  431. /* stylelint-disable-next-line declaration-no-important */
  432. background: none !important;
  433. box-shadow: none;
  434. height: unset;
  435. }
  436. --_padding: 0.5em;
  437. border: none;
  438. background-color: var(--background);
  439. color: var(--text);
  440. box-shadow: var(--shadow);
  441. font-family: var(--font);
  442. font-size: 1em;
  443. margin: 0;
  444. box-sizing: border-box;
  445. display: inline-block;
  446. position: relative;
  447. line-height: 2;
  448. hyphens: none;
  449. padding: 0 var(--_padding);
  450. &:disabled,
  451. &[disabled="disabled"],
  452. &.disabled {
  453. cursor: not-allowed;
  454. }
  455. &[type="range"] {
  456. background: none;
  457. border: none;
  458. margin: 0;
  459. box-shadow: none;
  460. flex: 1;
  461. }
  462. &[type="radio"] {
  463. display: none;
  464. &:checked + label::before {
  465. box-shadow: var(--shadow);
  466. background-color: var(--background);
  467. color: var(--text);
  468. }
  469. &:disabled {
  470. &,
  471. & + label,
  472. & + label::before {
  473. opacity: 0.5;
  474. }
  475. }
  476. + label::before {
  477. flex-shrink: 0;
  478. display: inline-block;
  479. content: "•";
  480. transition: box-shadow 200ms;
  481. width: 1.1em;
  482. height: 1.1em;
  483. border-radius: 100%; // Radio buttons should always be circle
  484. background-color: var(--background);
  485. box-shadow: var(--shadow);
  486. margin-right: 0.5em;
  487. vertical-align: top;
  488. text-align: center;
  489. line-height: 1.1;
  490. font-size: 1.1em;
  491. box-sizing: border-box;
  492. color: transparent;
  493. overflow: hidden;
  494. }
  495. }
  496. &[type="checkbox"] {
  497. &:checked + label::before {
  498. color: var(--text);
  499. background-color: var(--background);
  500. box-shadow: var(--shadow);
  501. }
  502. &:disabled {
  503. &,
  504. & + label,
  505. & + label::before {
  506. opacity: 0.5;
  507. }
  508. }
  509. + label::before {
  510. flex-shrink: 0;
  511. display: inline-block;
  512. content: "✓";
  513. transition: color 200ms;
  514. width: 1.1em;
  515. height: 1.1em;
  516. border-radius: var(--roundness);
  517. box-shadow: var(--shadow);
  518. margin-right: 0.5em;
  519. vertical-align: top;
  520. text-align: center;
  521. line-height: 1.1;
  522. font-size: 1.1em;
  523. box-sizing: border-box;
  524. color: transparent;
  525. overflow: hidden;
  526. }
  527. }
  528. &.resize-height {
  529. resize: vertical;
  530. }
  531. }
  532. .input,
  533. .button-default {
  534. --_roundness-left: var(--roundness);
  535. --_roundness-right: var(--roundness);
  536. border-top-left-radius: var(--_roundness-left);
  537. border-bottom-left-radius: var(--_roundness-left);
  538. border-top-right-radius: var(--_roundness-right);
  539. border-bottom-right-radius: var(--_roundness-right);
  540. }
  541. // Textareas should have stock line-height + vertical padding instead of huge line-height
  542. textarea.input {
  543. padding: var(--_padding);
  544. line-height: var(--post-line-height);
  545. }
  546. option {
  547. color: var(--text);
  548. background-color: var(--background);
  549. }
  550. .hide-number-spinner {
  551. appearance: textfield;
  552. &[type="number"]::-webkit-inner-spin-button,
  553. &[type="number"]::-webkit-outer-spin-button {
  554. opacity: 0;
  555. display: none;
  556. }
  557. }
  558. .cards-list {
  559. list-style: none;
  560. display: grid;
  561. grid-auto-flow: row dense;
  562. grid-template-columns: 1fr 1fr;
  563. li {
  564. border: 1px solid var(--border);
  565. border-radius: var(--roundness);
  566. padding: 0.5em;
  567. margin: 0.25em;
  568. }
  569. }
  570. .btn-block {
  571. display: block;
  572. width: 100%;
  573. }
  574. .btn-group {
  575. position: relative;
  576. display: inline-flex;
  577. vertical-align: middle;
  578. > *,
  579. > * .button-default {
  580. --_roundness-left: 0;
  581. --_roundness-right: 0;
  582. position: relative;
  583. flex: 1 1 auto;
  584. }
  585. > *:first-child,
  586. > *:first-child .button-default {
  587. --_roundness-left: var(--roundness);
  588. }
  589. > *:last-child,
  590. > *:last-child .button-default {
  591. --_roundness-right: var(--roundness);
  592. }
  593. }
  594. .fa {
  595. color: grey;
  596. }
  597. .mobile-shown {
  598. display: none;
  599. }
  600. .badge {
  601. box-sizing: border-box;
  602. display: inline-block;
  603. border-radius: 99px;
  604. max-width: 10em;
  605. min-width: 1.7em;
  606. height: 1.3em;
  607. padding: 0.15em;
  608. vertical-align: middle;
  609. font-weight: normal;
  610. font-style: normal;
  611. font-size: 0.9em;
  612. line-height: 1;
  613. text-align: center;
  614. white-space: nowrap;
  615. overflow: hidden;
  616. text-overflow: ellipsis;
  617. &.-dot,
  618. &.-counter {
  619. margin: 0;
  620. position: absolute;
  621. }
  622. &.-dot {
  623. min-height: 8px;
  624. max-height: 8px;
  625. min-width: 8px;
  626. max-width: 8px;
  627. padding: 0;
  628. line-height: 0;
  629. font-size: 0;
  630. left: calc(50% - 4px);
  631. top: calc(50% - 4px);
  632. margin-left: 6px;
  633. margin-top: -6px;
  634. }
  635. &.-counter {
  636. border-radius: var(--roundness);
  637. font-size: 0.75em;
  638. line-height: 1;
  639. text-align: right;
  640. padding: 0.2em;
  641. min-width: 0;
  642. left: calc(50% - 0.5em);
  643. top: calc(50% - 0.4em);
  644. margin-left: 0.7em;
  645. margin-top: -1em;
  646. }
  647. }
  648. .alert {
  649. margin: 0 0.35em;
  650. padding: 0 0.25em;
  651. border-radius: var(--roundness);
  652. border: 1px solid var(--border);
  653. }
  654. .faint {
  655. --text: var(--textFaint);
  656. --link: var(--linkFaint);
  657. color: var(--text);
  658. }
  659. .visibility-notice {
  660. padding: 0.5em;
  661. border: 1px solid var(--textFaint);
  662. border-radius: var(--roundness);
  663. }
  664. .notice-dismissible {
  665. padding-right: 4rem;
  666. position: relative;
  667. .dismiss {
  668. position: absolute;
  669. top: 0;
  670. right: 0;
  671. padding: 0.5em;
  672. color: inherit;
  673. }
  674. }
  675. .fa-scale-110 {
  676. &.svg-inline--fa,
  677. &.iconLetter {
  678. font-size: 1.1em;
  679. }
  680. &.svg-inline--fa {
  681. vertical-align: -0.15em;
  682. }
  683. }
  684. .fa-old-padding {
  685. &.iconLetter,
  686. &.svg-inline--fa,
  687. &-layer {
  688. padding: 0 0.3em;
  689. }
  690. }
  691. .veryfaint {
  692. opacity: 0.25;
  693. }
  694. .timeago {
  695. --link: var(--text);
  696. --linkFaint: var(--textFaint);
  697. }
  698. .login-hint {
  699. text-align: center;
  700. @media all and (min-width: 801px) {
  701. display: none;
  702. }
  703. a {
  704. display: inline-block;
  705. padding: 1em 0;
  706. width: 100%;
  707. }
  708. }
  709. .btn.button-default {
  710. min-height: 2em;
  711. }
  712. .new-status-notification {
  713. position: relative;
  714. font-size: 1.1em;
  715. z-index: 1;
  716. flex: 1;
  717. }
  718. @media all and (max-width: 800px) {
  719. .mobile-hidden {
  720. display: none;
  721. }
  722. }
  723. @keyframes spin {
  724. 0% {
  725. transform: rotate(0deg);
  726. }
  727. 100% {
  728. transform: rotate(359deg);
  729. }
  730. }
  731. @keyframes shakeError {
  732. 0% {
  733. transform: translateX(0);
  734. }
  735. 15% {
  736. transform: translateX(0.375rem);
  737. }
  738. 30% {
  739. transform: translateX(-0.375rem);
  740. }
  741. 45% {
  742. transform: translateX(0.375rem);
  743. }
  744. 60% {
  745. transform: translateX(-0.375rem);
  746. }
  747. 75% {
  748. transform: translateX(0.375rem);
  749. }
  750. 90% {
  751. transform: translateX(-0.375rem);
  752. }
  753. 100% {
  754. transform: translateX(0);
  755. }
  756. }
  757. // Vue transitions
  758. .fade-enter-active,
  759. .fade-leave-active {
  760. transition: opacity 0.3s;
  761. }
  762. .fade-enter-from,
  763. .fade-leave-active {
  764. opacity: 0;
  765. }
  766. /* stylelint-enable no-descending-specificity */
  767. .visible-for-screenreader-only {
  768. display: block;
  769. width: 1px;
  770. height: 1px;
  771. margin: -1px;
  772. overflow: hidden;
  773. visibility: visible;
  774. clip: rect(0 0 0 0);
  775. padding: 0;
  776. position: absolute;
  777. }
  778. *::selection {
  779. color: var(--selectionText);
  780. background-color: var(--selectionBackground);
  781. }