logo

pleroma-fe

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

App.scss (18052B)


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