Skip to content

Instantly share code, notes, and snippets.

@justmarkup
Last active November 8, 2022 09:03
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justmarkup/e4f6d52bef604e170815aaf44f459fbc to your computer and use it in GitHub Desktop.
Save justmarkup/e4f6d52bef604e170815aaf44f459fbc to your computer and use it in GitHub Desktop.
User stylesheet for Mastodon
/* Visually warn about inaccessible images in feed */
.status img:not([alt]),
.status img[alt=""] {
border-top: 2em solid red;
}
/* Highlight private toots, toots only mentioned people can see. From https://mastodon.social/@matuzo */
.status__wrapper-direct {
padding-inline-end: 20px;
}
.status__wrapper-direct::after {
content: "private";
background-color: #cbe7f0;
display: inline-block;
padding: 0rem 0.2rem;
position: absolute;
inset-inline-end: 0;
inset-block-start: 0;
writing-mode: vertical-rl;
height: 100%;
text-align: center;
}
/* Show profile header image in 16/9 format. From https://mastodon.social/@matuzo */
.account__header__image {
aspect-ratio: 16 / 9;
height: auto;
}
/* Hide trending now */
.getting-started__trends {
display: none;
}
/* Flip the right and left column on desktop. From https://mastodon.social/@matuzo */
.columns-area__panels {
flex-direction: row-reverse;
}
@jensgro
Copy link

jensgro commented Nov 4, 2022

The writing-mode: sideways-rl didn't work for me in Chrome. I changed it to writing-mode: vertical-rl and everything was fine.

@justmarkup
Copy link
Author

@jensgro Thanks, updated the gist.

@nicosomb
Copy link

nicosomb commented Nov 4, 2022

@justmarkup the 3em border is a little bit aggressive. I reduced it on my side. And I apply it only on img in <article> (to avoid the border on profile page with the banner for example)

@justmarkup
Copy link
Author

@nicosomb Thanks, updated the gist to only show the border for inaccessible images in a status.

@matuzo
Copy link

matuzo commented Nov 4, 2022

/* Flip the right and left column on desktop */
.columns-area__panels {
  flex-direction: row-reverse;
}

@nicosomb
Copy link

nicosomb commented Nov 4, 2022

On simple interface, to switch columns (thanks to Manuel)

.columns-area__panels {
    flex-direction: row-reverse;
}

@nicosomb
Copy link

nicosomb commented Nov 4, 2022

haha too fast @matuzo

@matuzo
Copy link

matuzo commented Nov 4, 2022

haha too fast @matuzo

😁

@justmarkup
Copy link
Author

Cheers @matuzo

@nhoizey
Copy link

nhoizey commented Nov 4, 2022

I've adapted some of these contributions (thanks @matuzo!) to ease color change with custom properties: https://gist.github.com/nhoizey/870ff8f60c599a51ec25d635983590e8

@justmarkup
Copy link
Author

@nhoizey Nice!

@juanfernandes
Copy link

I added this to mine to make the home panel wider and let the others take up the full width:

.columns-area {
  display: grid !important;
  grid-template-columns: 1fr 2fr 1fr 1fr;
}
.drawer,
.column {
  width: 100% !important;
}

@nhoizey
Copy link

nhoizey commented Nov 4, 2022

@juanfernandes I think one 1fr is missing, isn't it?

I use it and changed the values to make the main column just 30 % larger than the others: grid-template-columns: 3fr 4fr 3fr 3fr 3fr

@juanfernandes
Copy link

@juanfernandes I think one 1fr is missing, isn't it?

I use it and changed the values to make the main column just 30 % larger than the others: grid-template-columns: 3fr 4fr 3fr 3fr 3fr

How many columns do you have on mastadon? I only have 4 🤔

@nhoizey
Copy link

nhoizey commented Nov 8, 2022

@juanfernandes I have 5

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment