Last active
April 14, 2021 11:56
-
-
Save sardisson/dd2ec67084f178cd0604317f2df076f7 to your computer and use it in GitHub Desktop.
CSS rules to declutter embedded Instagram posts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* instagram-embed.css - v1.0, 3 August 2018 | |
* | |
* In your favorite user CSS tool or stylesheet, set the following rules to | |
* apply to | |
* https://*.instagram.com/* | |
* (or equivalent; the entire instagram.com domain) | |
* | |
* N.B. Your user CSS tool must be able apply CSS rules to <iframe>s, rather | |
* than only applying them based on the URL in the browser's location bar. | |
*/ | |
/* Remove clutter */ | |
div[class="HoverCard"], div[class="SocialProof"], div[class="Feedback"], | |
span[class="FollowerCountText"], a[class="ViewProfileButton"], | |
a[class="CaptionCommentsExpand"] { display: none !important; } | |
/* Fix position of caption after clutter removal */ | |
div[class="Caption"] { padding-top: 10px !important; } | |
/* Make dots for multiple-photo posts appear inside the photo, rather than | |
* on top of the caption, after clutter removal. If you want to hide the dots | |
* altogether (they are normally hidden on embeds by the hovercard launcher), | |
* replace "margin-top: -15px" in the next line with "display: none". | |
*/ | |
div[class="EmbedSidecar"] div[class*="ijCUd"] { margin-top: -15px !important; } | |
/* Shrink the embed to fit the new content size after clutter removal */ | |
div[data-oembed-url*="https://www.instagram.com/"] { height: auto !important; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment