pasc91

Mastodon Theming / CSS Tricks

Jan 7th, 2023 (edited)
3,807
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.56 KB | None | 0 0
  1. *mastodon-cssmods *mastodon-theming
  2. Other: NNL
  3.  
  4.  
  5. pb td config: https://web.archive.org/web/20230107211151/https://pb.todon.de/custom.css
  6.  
  7.  
  8.  
  9. twitteresque:
  10. https://mementomori.social/custom.css
  11. https://github.com/ronilaukkarinen/mastodon-bird-ui
  12.  
  13. Introduction to css theming https://blog.atomicpoet.org/s/huRYhaSok#
  14.  
  15. Advanced scss theming https://glitch-soc.github.io/docs/features/themes/
  16.  
  17. Highly customized mastodon: https://github.com/koyuspace/mastodon
  18.  
  19. Instance ticker https://34.si/about https://koyu.space/@weepjp/109671126495963482
  20.  
  21. Stylesheet to make Mastodon more macOS-like (browser based) https://gist.github.com/pcantrell/5572729080a0ce938572a48f2e12b3ca
  22.  
  23.  
  24. =====================
  25. == mastodoncssmods ===
  26.  
  27. AutoDarkmode Enabler (color-text-swap-broken_choose color between blk/white for text !!)
  28. -------------------
  29. /*darkmode enabler*/
  30. @media (prefers-color-scheme: dark) {
  31. /*Dark Mode CSS Start*/
  32. body,
  33. .tabs-bar__wrapper,
  34. .column > .scrollable,
  35. .detailed-status,
  36. .detailed-status__action-bar,
  37. .column-header__back-button,
  38. .admin-wrapper .sidebar-wrapper__inner,
  39. .search__input,
  40. .account__header,
  41. .account__section-headline, .notification__filter-bar {
  42. background: #000 !important;}
  43. .column-header > button,
  44. .column-back-button,
  45. .column-header > button,
  46. .column-header__button,
  47. .column-header {
  48. background: none !important;}
  49. .tabs-bar__wrapper {
  50. background: rgba(0, 0, 0, 0.5) !important;
  51. backdrop-filter: blur(10px) saturate(200%);}
  52. .compose-form .autosuggest-textarea__textarea,
  53. .compose-form .spoiler-input__input {
  54. color: inherit !important;
  55. background: none !important;}
  56. .compose-panel .compose-form__autosuggest-wrapper {
  57. background-color: rgba(255, 255, 255, 0.06) !important;}
  58. .compose-form .compose-form__buttons-wrapper,
  59. .compose-form .compose-form__modifiers {
  60. background: none !important;}
  61. .compose-form .emoji-picker-dropdown {
  62. display: true;}
  63. /*{
  64. .public-layout .public-account-header__tabs__tabs .counter .counter-number,
  65. .reply-indicator__content, .status__content,
  66. .muted .status__content a, .muted .status__content p, .muted .status__display-name strong,
  67. .status__prepend,
  68. .account__action-bar__tab strong,
  69. .public-layout .public-account-header__tabs__name h1,
  70. .public-layout .public-account-header__extra__links a strong
  71. {color: #fff;
  72. text-shadow: none;}*/
  73. /*Dark Mode CSS End*/}
  74. (Source: https://github.com/mastodon/mastodon/discussions/22800 )
  75.  
  76.  
  77. Disable Emoji picker:
  78. ---------------------
  79. }.compose-form .emoji-picker-dropdown {
  80. display: none;}
  81. (source: https://github.com/mastodon/mastodon/discussions/22800 )
  82.  
  83.  
  84. Make Avatars / pfp circular
  85. ----------------------------
  86. .account__avatar {
  87. border-radius: 100%;
  88. z-index: 1;
  89. }
  90.  
  91.  
  92. Retro Terminal Effect
  93. ---------------------
  94. body::after {
  95. content: "";
  96. position: fixed;
  97. top: 0;
  98. left: 0;
  99. width: 100vw;
  100. height: 100vh;
  101. pointer-events: none !important;
  102. background: repeating-linear-gradient(
  103. 0deg,
  104. rgba(0,0,0,0.25),
  105. rgba(0,0,0,0.25) 1px,
  106. transparent 1px,
  107. transparent 2px
  108. );}
  109.  
  110.  
  111.  
  112. /*Overlay Mastodon Logo with own one*/
  113. --------------------------------------
  114. }
  115. .logo-container h1 a {
  116. background: transparent url('https://pb.todon.de/system/media_attachments/files/109/649/581/638/053/900/original/3b62d7d036d73159.png') no-repeat bottom/100% auto !important;
  117. padding: 79px;}
  118. .public-layout .header .brand {
  119. background: transparent url(https://pb.todon.de/system/media_attachments/files/109/649/581/638/053/900/original/3b62d7d036d73159.png) no-repeat center/160% auto !important;
  120. margin-top: 1px;
  121. margin-left: 10px;}
  122. .landing-page__logo {
  123. background: transparent url(https://pb.todon.de/system/media_attachments/files/109/649/581/638/053/900/original/3b62d7d036d73159.png) no-repeat bottom/100% auto !important;
  124. padding: 30px;}
  125. @media(min-width:800px) {
  126. a[href="/"]:not(.logofont):not(.button) {
  127. background: transparent url(https://pb.todon.de/system/media_attachments/files/109/649/581/638/053/900/original/3b62d7d036d73159.png) no-repeat center/75% auto !important;
  128. box-sizing: border-box;
  129. display: block;
  130. margin-left: -24px;
  131. margin-top: 1px;}}
  132. @media(max-width:800px) {
  133. a[href="/"]:not(.button) {
  134. background: transparent url(https://pb.todon.de/system/media_attachments/files/109/649/581/638/053/900/original/3b62d7d036d73159.png) no-repeat top/50% auto !important;
  135. box-sizing: border-box;
  136. display: block;
  137. margin-left: -160px;
  138. margin-top: 8px;}}
  139. .brand {
  140. background: transparent url(https://pb.todon.de/system/media_attachments/files/109/649/581/638/053/900/original/3b62d7d036d73159.png) no-repeat top/170% auto !important;
  141. padding: 60px;
  142. width: 90px;}
  143. .public-layout .footer .brand {
  144. display: inline-block;
  145. padding: 30px;}
  146. .landing-page h1 small:after {
  147. content: "A cute Mastodon server!";
  148. visibility: visible;
  149. display: block;
  150. position: absolute;}
  151. img[alt="Mastodon"],
  152. .landing-page h1 small,
  153. a[href="/"] svg {
  154. visibility: hidden;}
  155. .modal-layout__mastodon,
  156. .public-layout .header .brand svg,
  157. .brand__tagline,
  158. a[href="https://joinmastodon.org/"],
  159. .landing-page__forms .button[href="https://joinmastodon.org"],
  160. .landing__brand svg,
  161. .public-layout .footer .brand svg,
  162. .logo-container h1 svg {
  163. display: none;}
  164. a.logofont {
  165. background: transparent !important;}
  166. .button.logo-button svg {
  167. display: none;}
  168. .logo-container > h1:nth-child(1) > a:nth-child(1) {
  169. background-size: 160% !important;}
  170. .logo-container {
  171. margin: 0 !important;}
  172. .column-title .logo > use {
  173. visibility: hidden;}
  174. .column-title .logo {
  175. background: transparent url(https://pb.todon.de/system/media_attachments/files/109/649/581/638/053/900/original/3b62d7d036d73159.png) no-repeat top/100% auto !important;}
  176. .column-actions {
  177. padding: 40px;}
  178. .column-actions__background {
  179. display: none;}
  180. .scrollable.follow-recommendations-container {
  181. background-image: url(https://pb.todon.de/system/media_attachments/files/109/649/581/638/053/900/original/3b62d7d036d73159.png);
  182. background-repeat: no-repeat;
  183. background-position: top;
  184. background-size: 20%;
  185. background-position-y: 10px;}
  186. .follow-recommendations-container > .column-title > svg {
  187. visibility: hidden;}
  188. .logo-container h1 {
  189. display: auto;}
  190. b {
  191. font-weight: bold !important;}
  192. #web a {
  193. background: transparent !important;
  194. margin: 0;}
  195. (Source: https://github.com/koyuspace/styles/tree/d4b4267515a97abeb3a0b2c07a4abce6125eb510 )
  196. ( https://github.com/koyuspace/styles/blob/d4b4267515a97abeb3a0b2c07a4abce6125eb510/custom.css )
  197.  
  198.  
  199. /*mastodon长图补丁 v2.1 by Shioko*/
  200. ----------------------------------
  201. .image-loader {
  202. align-items:center;}
  203. .zoomable-image {
  204. display: flex;
  205. height:auto;
  206. max-height: 100%;
  207. width: auto;
  208. max-width: 95%;
  209. overflow: auto !important;
  210. align-items:center;}
  211. .zoomable-image:hover {
  212. align-items: flex-start;}
  213. .zoomable-image img {
  214. max-height: 100%;
  215. max-width:95%;}
  216. .zoomable-image img:hover {
  217. max-height: 2000%;
  218. max-width:95%;}
  219.  
  220.  
  221.  
  222.  
  223. /*hashtag style by @[email protected] and @[email protected]*/
  224. -----------------------
  225. .mention.hashtag.status-link{
  226. background-color: #93AEFD36;
  227. padding: 0px 5px;
  228. text-align: center;
  229. text-decoration: none;
  230. display: inline-block;
  231. border-style: dashed;
  232. border-color: #93AEFD;
  233. border-width: 0.5px;
  234. border-radius: 5px;
  235. }.mention.hashtag.status-link:hover{
  236. background-color: #cdd2f54f;
  237.  
  238.  
  239. emoji zoom (hover) css:
  240. -------------
  241. .emojione:hover { width: 50px !important; /* set the width and height of the expanded emojo here */ height: 50px !important; transition: all 0.3s ease-in-out !important; /* the 0.3s is the animation time for growing the emojo, it can be set to 0 */; } .emojione { transition: all 0.2s ease-in-out; /* the 0.2s is the animation time for shrinking the emojo, it can be set to 0 */; }
  242. (source: https://github.com/trwnh/mastomods/blob/main/app/javascript/styles/mods/display_emojizoom.css
  243.  
  244. stars to hearts:
  245. ----------------------
  246. .notification__favourite-icon-wrapper .star-icon,
  247. .star-icon.active,
  248. .star-icon:hover,
  249. .star-icon:active
  250. {color: crimson !important;}
  251. .fa-star:before {content: "♥";}
  252. (source: https://github.com/trwnh/mastomods/blob/main/app/javascript/styles/mods/display_starstohearts.css )
  253.  
  254.  
  255. Personalize "register reason field"
  256. ------------------------------------
  257. https://pad.wolkenbar.de/mastodon-css
  258. https://chaos.social/@rstockm/109389657065945836
  259.  
  260.  
  261. /*Red Line Around #noalttext content*/ mark noalttext
  262. -------------------------------------
  263. a.status-link:not(.mention) {
  264. text-decoration: underline;}
  265. .media-gallery__item-thumbnail img:not([alt]),
  266. .audio-player__canvas:not([title]),
  267. .video-player video:not([title]),
  268. .media-gallery__gifv video:not([title]),
  269. .media-gallery__item-thumbnail img[alt=""], .audio-player__canvas[title=""], .video-player video[title=""], .media-gallery__gifv video[title=""]
  270. {
  271. border: 1px dashed rgba(251, 47, 47, 0.5);
  272. box-sizing: border-box;}
  273. (Source: https://artisan.chat/custom.css)
  274. (https://gist.github.com/FiXato/3de505b04efefd49a1e3568b70545234 )
  275.  
  276.  
  277.  
  278. Remove Follower Count
  279. -----------------------------------
  280.  
  281. .item-list .display-name__account {
  282. display: block;
  283. }
  284.  
  285. .item-list .account__details > span:first-child {
  286. display: none;
  287. }
  288.  
  289. https://mastodon.art/@Curator/111109871658587044
  290.  
  291.  
  292. =========================================================================
  293. ===================== mastodontheming ===================================
  294.  
  295.  
  296.  
  297. Change mouse cursor:
  298. --------------------
  299. }
  300. *:not(textarea):not(a):not(input):not(p), .link-button:disabled, .button:disabled, .icon-button:disabled, .text-icon-button:disabled, .column-header__button:not(:disabled), .status, .navigationbar, .character-counter, .media-gallery__item-thumbnail, .notification__message, .navigation-bar, .column-subheading, .timeline-hint, .regeneration-indicator, .column-settings__section, .empty-column-indicator, .follow_requests-unlocked_explanation, .error-column, .search__icon.fa, .search-results__header, .icon-button:disabled, .notification__filter-bar, .account__section-headline, .account__avatar, .notification-bar {
  301. cursor: url(data:image/gif;base64,R0lGODlhDAATAMZHAAAAAAAABAAABQABFwABGQABGgACGwACHAACHQVFVxtIWglZcJo6iZ08jA1qhg9vjKhAlqtBmBF3l7VEobZEohJ4mL1HqMBIqhR/oBWBpC57msZKsBWFqNFOutRQvdpSwt1TxReSueZXzRmex/Rc2hqm0v9g4/9h5Rus2f9k7Rut2v9l7f9l7/9m8P9m8f9n9f9s//9u/x235x266kOx3R7B8/+M/0zL/03N/7W1tU/T/7q6usLCwlXh/1Xi/1jo/8rKyljp/1nr/1ru/9PT0+Li4ujo6P///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEKAH8ALAAAAAAMABMAAAeHgAh/g4SFfwgAhoYHQYmKgwZDOI6KBj8+KJSFBT1CNSOagwUvMS0gF6EFLjA2JB0WmgVHs0dFQDuUsrRGRDw5jgUrLCYiHhsTEAyJBSknHxQRDQzTAAAFOjMZDhIP1d4FNyEJAhgcmgQ0CokAKOaEAxqOADIqlAABhQAlC6GEABXVHg0KOCgQADs=), auto;
  302. }
  303.  
  304. Source: https://pb.todon.de/@[email protected]/111117793270694721
  305. https://social.animeprincess.net/@zoe/111117793210585926
  306. social.animeprincess.net/custom.css
  307.  
  308.  
  309. /*custom publish box*/
  310. .compose-form .autosuggest-textarea__textarea, .compose-form .spoiler-input__input {
  311. background: linear-gradient(to right, #ffffff, #f0f8ff);}
  312. .compose-form .compose-form__modifiers .compose-form__uploads-wrapper {
  313. background: #ffdbe0;}
  314. .compose-form .compose-form__buttons-wrapper {
  315. background: #ffdbe0;}
  316.  
  317.  
  318. /*header*/
  319. account__section-headline a, .account__section-headline button, .notification__filter-bar a, .notification__filter-bar button {
  320. color: #ffffff;}
  321. .tabs-bar__wrapper {
  322. background: #ffffff;}
  323.  
  324.  
  325. /*Flex Spacer*/
  326. .status {
  327. border-bottom: 1px solid #b5485d;
  328. .flex-spacer, .getting-started, .getting-started__wrapper {
  329. background: #b5485d;}
  330. .iu__header {
  331. background: #b5485d; }
  332.  
  333.  
  334. /*Searchbar*/
  335. .column-header {
  336. background: #b5485d;}
  337. .search__input { background: #b5485d; }
  338.  
  339.  
  340.  
  341. Change Publish Button Text (broken)
  342. -----------------------------
  343. .compose-panel button.button.button--block::after {
  344. content: "Hop!";
  345. text-indent: 0;
  346. display: block;
  347. line-height: initial;}
  348. .compose-panel button.button.button--block {
  349. text-indent: -9999px;
  350. line-height: 0;}
  351. (Source: reddit.com/r/Mastodon/comments/yruwts/are_you_tired_of_tooting_and_want_to_try/ )
  352.  
  353.  
  354. Change "Toot" Text
  355. ------------------------------
  356. .compose-form__publish-button-wrapper .button--block {
  357. text-indent: -9999px;
  358. line-height: 0;
  359. }
  360. .compose-form__publish-button-wrapper .button--block::before {
  361. content: "Toot !";
  362. text-indent: 0;
  363. display: block;
  364. line-height: initial;
  365. padding: 7px;
  366. }
  367. https://jsfiddle.net/yb98seug/
  368. https://mastodon.social/@[email protected]/103442328974196985
  369.  
  370.  
  371. Force all #hashtags & #hyperlinks into same color:
  372. ------------
  373. .status-link {
  374. color: #fca3b7 !important;
  375. }
  376.  
  377. More:
  378. https://pb.todon.de/@admin/109647888787131567
  379.  
  380.  
  381.  
  382. /* Make property fields inline-blocks instead of blocks, allowing them
  383. to sit next to each other instead of line breaking between them. */
  384. .account__header__fields dl dt,
  385. .account__header__fields dl dd {
  386. display: inline-block;}
  387.  
  388. /* Make header mixed-case and cap the max width at 40% */
  389. .account__header__fields dl dt {
  390. text-transform: none !important;
  391. min-width: 40%; }
  392.  
  393. /* Add a ":" after the header */
  394. .account__header__fields dl dt:after {
  395. content: ":";
  396. padding-right: 0.5em;}
  397. (Source: https://infosec.exchange/custom.css )
  398.  
  399.  
  400.  
  401. Disable Toast messages/notification-bar ("Post published"):
  402. -----------------------------------------------------------
  403. .notification-bar {
  404. display: none !important;
  405. }
  406.  
  407.  
  408.  
  409. /* Make Header Fields 2x2 */
  410. .account__header__fields {
  411. display: grid;
  412. grid-template-columns: repeat(2, minmax(0, 1fr));
  413. gap: 1px;
  414. margin: 0 auto;
  415. white-space: nowrap;
  416. overflow: hidden;
  417. }
  418. .account__header__fields a {
  419. animation: colorAnimation 6s infinite;
  420. white-space: nowrap;
  421. text-overflow: ellipsis;
  422. display: inline-block;
  423. max-width: 13ch;
  424. width: 100%;
  425. box-sizing: border-box;
  426. }
  427. .account__header__fields::before {
  428. content: "";
  429. align-self: stretch;
  430. overflow: hidden;
  431. text-overflow: ellipsis;
  432. white-space: nowrap;
  433. }
  434. @keyframes colorAnimation {
  435. 0% { color: blue; }50% { color: violet; }100% { color: darkviolet; }}
  436.  
  437.  
  438.  
  439. /* Cool pink 3D Button */
  440. .btn,
  441. .button {
  442. background-color:#ffaec9!important;
  443. border:3px outset #ffcfdf!important;
  444. color:black!important;
  445. }
  446. .btn:hover,
  447. .button:hover {
  448. border-style:inset!important;
  449. color:black!important;
  450. }
  451. (Source: https://gamemaking.social/custom.css )
Add Comment
Please, Sign In to add comment