Highlights images on Mastodon with a red dotted border if they don't have alt text
Mastodon Alt Text Indicator by cincodenada

Details
Authorcincodenada
LicenseCC0
Category.*
Created
Updated
Code size1.2 kB
Code checksum82978717
Statistics
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
Description
Notes
Inspired by a similar CSS at friend.camp. Ping me at @c9a@cathode.church if something's wonky or you have improvements!
Source code
/* ==UserStyle==
@name Mastodon Alt Text Indicator
@namespace github.com/openstyles/stylus
@version 1.1.1
@description Highlights images on Mastodon with a red dotted border if they don't have alt text
@author Ell Bradshaw
==/UserStyle== */
@-moz-document regexp(".*") {
/* For some reason the gallery hides the outer 2px of the image edges for multi-image galleries, this makes our dotted lines visible again */
#mastodon .media-gallery {
overflow: visible;
/* Alternate option: */
/* padding: 2px; */
}
/* Selectors borrowed from friend.camp's custom CSS */
#mastodon .audio-player__canvas:not([title]),
#mastodon .audio-player__canvas[title=""],
#mastodon .media-gallery__gifv video:not([title]),
#mastodon .media-gallery__gifv video[title=""],
#mastodon .media-gallery__item-thumbnail img:not([alt]),
#mastodon .media-gallery__item-thumbnail img[alt=""],
#mastodon .video-player video:not([title]),
#mastodon .video-player video[title=""] {
/* Change border width or color here if you like */
border: 3px dashed red;
box-sizing: border-box;
}
}