Skip to content

Twitter Style Fix by ScorpDK

Details

AuthorScorpDK

LicenseNo License

Categorytwitter.com, x.com

Created

Updated

Size1.4 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Uncrops Twitter Images, scaling them to fit the containing boxes instead.

Notes

Now also uncrops the Image Timeline, only tested it on a few accounts I follow and my own, so...
consider it highly experimental. You can comment it our / delete the part if you don't want/need it.

Source code

/* ==UserStyle==
@name         Twitter Style Fix
@version      20240610.02.13
@namespace    https://userstyles.world/user/ScorpDK
@description  Uncrops Twitter Images, scaling them to fit the containing boxes instead.
@author       ScorpDK
@license      No License
==/UserStyle== */

@-moz-document domain("twitter.com"), domain("x.com") {
/* Internal Twitter Images */
[aria-label = "Image"]
{
	size: 100% !important;
	width: 100% !important;
	margin: 0px !important;
	padding: 0px !important;
	max-width: 100% !important;
	height: auto !important;
}

[data-testid = "tweetPhoto"]
{
	size: 100% !important;
	width: 100% !important;
	margin: 0px !important;
	padding: 0px !important;
	max-width: 100% !important;
	height: auto !important;
}

[role = "article"] > * *
{
	background-size: contain !important;
}

[aria-label = "Image"]
{
	max-width: 100% !important;
	height: auto !important;
	margin: auto !important;
	padding: auto !important;
	flex-shrink: auto !important;
	flex-grow: 0px !important;
}

[aria-label = "Embedded video"]
{
	width: 95% !important;
	height: 95% !important;
	padding: 0px !important;
	border: 5px !important;
	margin: 0px !important;
}

[aria-label = "Image"] > div
{
	background-size: contain !important;
}

/* Image Timeline, will break whenever Twitter changes their class names, I guess */
.css-175oi2r > * *
{
	background-size: contain !important;
}
}

Reviews

No reviews yet.