Skip to content

Instantly share code, notes, and snippets.

@MatheusAvellar
Created August 5, 2021 15:03
Show Gist options
  • Save MatheusAvellar/4655d5b21c5cdc91e6edfff0aed13003 to your computer and use it in GitHub Desktop.
Save MatheusAvellar/4655d5b21c5cdc91e6edfff0aed13003 to your computer and use it in GitHub Desktop.
Display alt text on Twitter Web
/* Based on MerryMage's twitter.css (https://gist.github.com/MerryMage/8276d87ea7aaf6773ba183667e53365d) */
div[data-testid="tweetPhoto"] {
margin: 0 !important;
}
div[data-testid="tweetPhoto"]:not([aria-label="Image"]):hover:after {
content: attr(aria-label);
color: white;
text-shadow: 0 0 2px black;
font-family: sans-serif;
font-size: 80%;
padding: 25px;
background: rgba(0,0,0,.5);
white-space: pre-wrap;
pointer-events: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment