Skip to content

Instantly share code, notes, and snippets.

@kmhcreative
Created December 24, 2022 19:02
Show Gist options
  • Save kmhcreative/5e1512247402037375369a41d53302e3 to your computer and use it in GitHub Desktop.
Save kmhcreative/5e1512247402037375369a41d53302e3 to your computer and use it in GitHub Desktop.
Big Link Previews on Every Mastodon Instance
/* MASTODON BIG PREVIEWS EVERYWHERE
================================
Safari does not understand @-moz-document or @-document
so this targets the main #mastodon element and should
work on EVERY Mastodon instance there is.
* Chrome & Firefox: copy & paste into "Stylus" add-on/extension
* Firefox: use or paste into userContent.css file
* Safari: Point Preferences, Advanced, Stylesheet to a .css file
with this code in it.
*/
#mastodon .status-card.compact {
border-color: #313543 !important;
background-color: #17191f !important;
display: block !important;
border-radius: 4px !important;
}
#mastodon .status-card.compact:hover {
background-color: #313543 !important;
}
#mastodon .status-card.compact #mastodon .status-card__image {
border-radius: 4px 4px 0px 0px !important;
overflow: hidden !important;
max-height: 400px !important;
}
#mastodon .status-card.compact #mastodon .status-card__title {
/* same as Explore News headlines */
font-size: 19px !important;
line-height: 24px !important;
font-weight: 500 !important;
margin-bottom: 4px !important;
overflow: visible !important;
white-space: normal !important;
}
#mastodon .status-card__host {
display: block !important;
margin-top: 5px !important;
font-size: 16px !important; /* bumped up font from 13px */
overflow: hidden !important;
text-overflow: ellipsis !important;
white-space: nowrap !important;
}
body.theme-mastodon-light #mastodon .status-card.compact {
border-color: #c9cdd9 !important;
background-color: #eff3f5 !important;
}
body.theme-mastodon-light #mastodon .status-card.compact:hover {
background-color: #c0cdd9 !important;
}
@kmhcreative
Copy link
Author

This is no longer necessary. They made this change in Mastodon itself.

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