Mastodon full-width columns

Makes the columns in Mastodon instances take up all the space.

目前为 2020-12-24 提交的版本。查看 最新版本

  1. /* ==UserStyle==
  2. @name Mastodon full-width columns
  3. @namespace gitlab.com/Neui/userstyles
  4. @homepageURL https://gitlab.com/Neui/userstyles
  5. @supportURL https://gitlab.com/Neui/userstyles/issues
  6. @version 1.0.1
  7. @license CC-BY-4.0
  8. @description Makes the columns in Mastodon instances take up all the space.
  9. @author Neui
  10. @preprocessor uso
  11. @var number nColumns "Number of columns" 4
  12. @var number minWidth "Columns minimum width (px)" 350
  13. @var number drawerMinWidth "Left-most column minimum width (px)" 300
  14. @var checkbox drawerFixed "Left-most column fixed width" 0
  15. ==/UserStyle== */
  16.  
  17. @-moz-document regexp("https?://mastodon\.[a-z0-9.-]+/.*") {
  18. body:not(.layout-single-column) .columns-area > .drawer,
  19. body:not(.layout-single-column) .columns-area > .column {
  20. --drawerFixedWidthForOtherColumns1: initial;
  21. --drawerFixedWidthForOtherColumns/*[[drawerFixed]]*/: calc(/*[[drawerMinWidth]]*/px / (/*[[nColumns]]*/ * /*[[nColumns]]*/));
  22. min-width: /*[[minWidth]]*/px;
  23. width: calc((100% / /*[[nColumns]]*/) + var(--drawerFixedWidthForOtherColumns1, 0px));
  24. }
  25. body:not(.layout-single-column) .columns-area > .drawer {
  26. min-width: /*[[drawerMinWidth]]*/px;
  27. --drawerFixedWidth1: initial;
  28. --drawerFixedWidth/*[[drawerFixed]]*/: /*[[drawerMinWidth]]*/px;
  29. width: var(--drawerFixedWidth1, calc(100% / /*[[nColumns]]*/));
  30. }
  31. body:not(.layout-single-column) .columns-area > .column__wrapper > .column {
  32. width: 100%;
  33. }
  34. /* Used when page width is narrow (phone-view) */
  35. body:not(.layout-single-column) .react-swipeable-view-container .columns-area > .column,
  36. body:not(.layout-single-column) .react-swipeable-view-container .columns-area > .drawer {
  37. width: inherit;
  38. }
  39. }