Browse Source

update for mastodon 4.3

main
xenua 2 months ago
parent
commit
11ae77875a
Signed by: xenua
GPG Key ID: 8F93B68BD37255B8
  1. 533
      mastodon/mastodon4.user.css

533
mastodon/mastodon4.user.css

@ -1,265 +1,446 @@
/* ==UserStyle== /* ==UserStyle==
@name mastodon 4 ui tweaks @name xenua's mastodon 4 frontend tweaks
@namespace mastodon4 @namespace git.xenua.me/xenua
@version 1.0.12 @version 1.1.0
@description fixes the weird spacing on the new mastodon web ui. intended for the advanced user interface, may also work with the single column one. @description makes the mastodon *advanced* webinterface more compact and pleasant to look at
@author xenua @author xenua
@license CNPLv7+ @license CNPLv7+
@homepageURL https://git.xenua.me/xenua/userstyles/
@supportURL https://chaos.social/@julialuna
@updateURL https://git.xenua.me/xenua/userstyles/raw/branch/main/mastodon/mastodon4.user.css
==/UserStyle== */ ==/UserStyle== */
@-moz-document domain("chaos.social") { @-moz-document domain("chaos.social") {
/* mastodon 4 ui tweaks that go hard maybe */
/* optional features at the bottom */
/* compact, space-optimized timeline look */ /* narrower, flexibly sized columns */
@media screen and (min-width: 1025px) {
.layout-multiple-columns .column,
.layout-multiple-columns .drawer {
flex: 1 1 auto;
min-width: 300px;
max-width: 400px;
}
}
/* fix up content warnings and filters */
.content-warning {
border-width: 0px 5px 0px 5px;
border-radius: 4px;
border-color: #9baec8;
border-style: solid;
&:after,
&:before {
content: unset;
}
p {
margin-top: 1.5em;
margin-bottom: 0px;
}
button.link-button {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
&:hover {
text-decoration: none;
}
span {
position: absolute;
top: 8px;
left: 0;
text-indent: 13px;
color: #9baec8;
visibility: hidden;
height: 20px;
width: 100%;
overflow: hidden;
text-align: left;
&:before {
content: "Show post with CN:";
display: block;
visibility: visible;
}
}
}
&:has(+ .status__content, notification-group__embedded-status__content) {
button.link-button span {
&:before {
content: "Hide post with CN:";
display: block;
visibility: visible;
}
}
}
&:has(+ .notification-group__embedded-status__content) {
button.link-button span {
&:before {
content: "Hide post with CN:";
display: block;
visibility: visible;
}
}
}
}
.content-warning--filter {
border-color: #ff4253;
button.link-button span {
&:before {
content: "Show filtered post:";
display: block;
visibility: visible;
}
}
&:has(+ .status__content, notification-group__embedded-status__content) {
button.link-button span {
&:before {
content: "Hide filtered post:";
display: block;
visibility: visible;
}
}
}
&:has(+ .notification-group__embedded-status__content) {
button.link-button span {
&:before {
content: "Hide filtered post:";
display: block;
visibility: visible;
}
}
}
}
/* much more compact general spacing */
.status__prepend { .status__prepend {
padding-top: 8px; padding: 8px 8px 0;
} }
.status, .detailed-status {
.status {
padding: 8px 0; padding: 8px 0;
.poll {
padding: 0 8px;
margin-top: 6px;
} }
.status > *, .detailed-status > * {
padding: 0 12px; .media-gallery {
margin-top: 6px;
} }
.status > .status__content, .detailed-status > .status__content {
padding: 0 16px; .hashtag-bar {
padding: 0 8px;
margin-top: 6px;
a {
padding: 4px;
} }
.status > .media-gallery, .detailed-status > .media-gallery {
padding: 0 !important;
margin-left: 4px;
margin-right: 4px;
width: calc(100% - 8px);
} }
.status--in-thread > .status__line {
inset-inline-start: 4px;
height: 100%;
} }
.status--in-thread > .status__line::before {
display: none; .status__info {
padding: 0 12px 8px;
} }
.status__line--first {
top: 0; .status__content {
padding: 0;
} }
.status__line {
border-inline-start: 2px solid #565e76; .status__content__text {
padding: 0 padding: 0 8px;
} }
.status--in-thread > .status__content {
padding: 0; .reply-indicator__content p,
margin-inline-start: 16px; .status__content p {
line-height: 21px;
margin-bottom: 12px;
} }
.status--in-thread .video-player {
margin-inline-start: 8px; .status__content__text blockquote {
width: calc(100% - 8px); padding-inline-start: 8px;
} }
.status--in-thread .hashtag-bar {
margin-inline-start: 8px; .status__content__read-more-button {
width: calc(100% - 32px); padding: 0 8px;
} }
.status-card { .status-card {
margin-inline-start: 0 !important; margin: 8px 8px 0;
width: calc(100% - 24px) !important;
margin: 12px 12px 0 12px !important;
padding: 0;
border: 2px solid #565e76;
} }
.status-card,
.status-card__actions>div {
border-radius: 4px;
}
.status-card__title {
font-size: 16px;
line-height: 18px;
}
.status-card__content { .status-card__content {
padding: 8px; padding: 8px 12px;
} }
.status-card__content > .status-card__host {
margin-bottom: 4px; .status-card__image {
border-bottom: 2px solid #565e76; flex: 0 0 auto;
} }
.status-card__content > .status-card__title {
font-size: 110%;
line-height: 20px;
.status-card__image,
.status-card__image-image,
.status-card__image-preview {
border-start-start-radius: 4px;
} }
.status-card__content > .status-card__description {
display: inline-block; .status-card.expanded .status-card__image,
line-height: 16px; .status-card.expanded .status-card__image-image,
max-height: 48px; .status-card.expanded .status-card__image-preview {
white-space: unset; border-start-end-radius: 4px;
} }
.media-gallery {
margin-top: 12px !important; .status__action-bar {
margin-top: 12px;
padding: 0 12px 0;
} }
.layout-multiple-columns .compose-form {
gap: 12px;
padding: 8px;
textarea {
padding: 8px;
}
.compose-form__footer {
padding: 0px 8px 8px;
}
.compose-form__highlightable {
border-radius: 8px;
}
}
.notification-ungrouped {
padding: 8px 0;
.status__action-bar { .status__action-bar {
margin-top: 8px; margin-inline-start: 0;
padding: 0 20px; width: calc(100% - 24px);
} }
.conversation .status__action-bar {
padding: 0; .status__content {
margin-inline-start: 0;
width: 100%;
} }
.status--in-thread .status__action-bar {
padding: 0 20px; .media-gallery,
.content-warning {
margin-inline-start: 0; margin-inline-start: 0;
width: calc(100% - 40px); width: 100%;
} }
.detailed-status > .detailed-status__meta {
margin-top: 12px;
padding: 0 16px;
} }
.status__info {
margin-bottom: 12px; .notification-ungrouped__header {
margin-bottom: 6px;
} }
.detailed-status__display-name {
margin-bottom: 12px; .notification-group {
padding: 8px;
} }
.notification > .notification__message {
padding: 8px 8px 0 8px; .notification-group__main {
margin-left: -48px;
} }
.detailed-status > .status__prepend {
margin-bottom: 8px; .notification-group__avatar-group {
padding-left: 12px; margin-left: 48px;
} }
.status__prepend {
padding-left: 12px; .notification-group__main__header__label {
padding: 0 8px;
} }
/* change the pm symbol back to what it should be */ .scrollable:has(> .item-list > .account-timeline__header) {
.fa-at::before { margin-top: -50px;
content: "";
} }
/* it's the toot button and that will never ever change */ .account__header__bar {
.compose-form__publish-button-wrapper > button::before { padding: 0 12px;
content: "Toot";
font-size: 15px;
} }
.compose-form__publish-button-wrapper > button {
font-size: 0px; .column-back-button {
padding-bottom: 2px; background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(1px);
} }
/* speaking of toot button, it might as well be wide */ .account__header__image {
.compose-form__publish-button-wrapper { height: 165px;
width: 100%;
} }
/* consistent spacing in some ui elements */ .media-gallery__actions {
.compose-form, .navigation-bar, .reply-indicator, .search-input, .link-footer { inset-inline-end: 4px;
padding: 8px; top: 4px;
} }
/* spoiler image button less intrusive */ .media-gallery__item__badges {
.icon-button.overlayed { bottom: -1px;
background: rgba(0,0,0,.4) /* default rgba(0,0,0,.6) */ inset-inline-end: -1px;
} }
/* rainbow toot button on hover because you're about to send something incredible */ .column>.scrollable {
.compose-form__publish-button-wrapper:hover { border: none;
animation: 4s linear 0s infinite rainbowfade;
} }
/* rainbow boost button */ .column-header,
.icon-button.active i.fa-retweet { .notification__filter-bar,
animation: 4s linear 0s infinite rainbowfade; .column-back-button {
border: none;
border-bottom: 1px solid var(--background-border-color);
} }
@keyframes rainbowfade { .column-back-button {
from { border-bottom: 1px solid rgba(0, 0, 0, 0.8);
filter: hue-rotate(0deg) saturate(1) brightness(1.1);
} }
to {
filter: hue-rotate(360deg) saturate(1) brightness(1.1); .status--in-thread {
.content-warning,
.status__content,
.status__action-bar,
.media-gallery,
.status-card {
margin-inline-start: 16px;
width: calc(100% - 16px);
} }
.status__action-bar {
margin-top: 8px;
padding: 0;
padding-left: 12px;
width: calc(100% - 44px);
} }
/*======== .status-card {
misc stuff width: calc(100% - 20px);
========*/ }
/* compact dropdown menu */ .status__content__text {
/* padding-left: 4px;
.dropdown-menu__container a { }
padding: 6px 8px;
font-size: 14px;
} }
*/
/* get rid of images in fav/boost notifs */ .detailed-status {
/* padding: 8px 0;
.notification .media-gallery {
display: flex; .media-gallery {
flex-flow: column nowrap; margin-top: 8px;
aspect-ratio: unset !important;
margin-top: 4px !important;
min-height: 0;
} }
.notification .media-gallery > .spoiler-button {
display: none;
} }
.notification .media-gallery > .media-gallery__preview {
display: none; .detailed-status__display-name {
margin-bottom: 8px;
padding: 0 12px;
} }
.notification .media-gallery > .media-gallery__item img {
display: none; .detailed-status__meta {
margin-top: 12px;
} }
.notification .media-gallery > .media-gallery__item > .media-gallery__item__badges {
display: none; .detailed-status__meta__line {
padding: 8px;
} }
.notification .media-gallery > .media-gallery__item > .media-gallery__item-thumbnail::after {
content: "🖼 Image."; .detailed-status__action-bar {
padding: 0 16px; padding: 6px 0;
font-size: 110%;
line-height: 125%
} }
*/
/* hide pm notice about e2ee */ .status__line {
/* inset-inline-start: 12px;
.follow_requests-unlocked_explanation {
display: none;
} }
*/
/* hide follow request indicator */ /* enlarge emoji on hover */
/* .emoji-mart-emoji:hover>* {
.column-link[title="Follow requests"] > .column-link__badge { transform: scale(2);
display: none; }
.emojione:hover {
transform: scale(1.5);
overflow: visible;
}
/* make the toot button say toot again */
.compose-form__submit>button::before {
content: "Toot!";
font-size: 15px;
}
.compose-form__actions>.compose-form__submit>button {
font-size: 0;
} }
*/
/* disable clicking on it as well */ /* rainbow toot button on hover because you're about to send something incredible */
/* .compose-form__submit>button:hover,
.column-link[title="Follow requests"] { /* rainbow boost button */
pointer-events: none; .icon-button.active svg.icon-retweet {
animation: 4s linear 0s infinite rainbowfade;
} }
*/
/*enlarge custom emoji on hover*/ @keyframes rainbowfade {
/* from {
.emoji-mart-emoji:hover > * { filter: hue-rotate(0deg) saturate(1) brightness(1.15);
height: 34px !important;
width: 34px !important;
} }
.emoji-mart-emoji:hover {
width: 34px !important; to {
height: 34px !important; filter: hue-rotate(360deg) saturate(1) brightness(1.15);
padding: 0 !important;
} }
:not(.emoji-button) > .emojione:hover {
width: 34px !important;
height: 34px !important;
} }
*/
/* colored visibility icons */ /* hide the "posts on mastodon aren't end to end encrypted" warning */
/* .follow_requests-unlocked_explanation {
.status__visibility-icon > .fa-globe, .detailed-status__meta > .fa-globe { display: none;
}
/* colorful status visibility icons */
.status__visibility-icon .icon-globe,
.detailed-status__meta .icon-globe {
color: #1976d2; color: #1976d2;
} }
.status__visibility-icon > .fa-unlock, .detailed-status__meta > .fa-unlock {
color: #388e3c; .status__visibility-icon .icon-unlock,
.detailed-status__meta .icon-unlock {
color: #43aa48;
} }
.status__visibility-icon > .fa-lock, .detailed-status__meta > .fa-lock {
.status__visibility-icon .icon-lock,
.detailed-status__meta .icon-lock {
color: #ffa000; color: #ffa000;
} }
.status__visibility-icon > .fa-at, .detailed-status__meta > .fa-at {
.status__visibility-icon .icon-at,
.detailed-status__meta .icon-at {
color: #d32f2f; color: #d32f2f;
} }
*/
}
/* lighten the columns to be able to distinguish them from the background */
@supports (color: hsl(from white h s l)) {
.columns-area>*>* {
background: hsl(from var(--background-color) h calc(s + 4) calc(l + 4));
}
.column-back-button {
background: rgba(0, 0, 0, 0.5);
}
}
}
Loading…
Cancel
Save