Skip to content

Instantly share code, notes, and snippets.

@nanos
Last active December 9, 2022 16:51
Show Gist options
  • Save nanos/efdbd2dc2902431d1b54e7d5c7d7dae9 to your computer and use it in GitHub Desktop.
Save nanos/efdbd2dc2902431d1b54e7d5c7d7dae9 to your computer and use it in GitHub Desktop.
Some custom CSS to collapse mastodon poll, favourite, and boost notifications

The CSS provided below will collapse your Mastodon notifications for polls that have ended, favourites and boosts to a single line.

The avatar and action buttons are also removed.

As a result your notificatios are far slimmer, and you can focus on the more interesting notifications, particularly mentions and replies.

You'll need to be Admin of your mastodon instance, though.

To install go to Preferences > Administration > Server settings. Change to the Appearance tab, and paste the CSS into the Custom CSS field.

image

.notification-poll p,
.notification-favourite p,
.notification-reblog p {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin: 0;
}
.notification-poll .status__content p,
.notification-poll .status__content .poll,
.notification-favourite .status__content p,
.notification-reblog .status__content p {
display: none;
}
.notification-poll .attachment-list,
.notification-favourite .attachment-list,
.notification-reblog .attachment-list {
display: none;
}
.notification-poll .status__content p:nth-child(1),
.notification-favourite .status__content p:nth-child(1),
.notification-reblog .status__content p:nth-child(1) {
display: block;
}
.notification-favourite .status__action-bar,
.notification-poll .status__action-bar,
.notification-reblog .status__action-bar {
display: none;
}
.notification-favourite .status,
.notification-poll .status,
.notification-reblog .status {
min-height: 0;
}
.notification-favourite .status__info,
.notification-poll .status__info,
.notification-reblog .status__info {
display: none
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment