Jump to content

Change font size on instagram browser specifically

Go to solution Solved by flocosix,

Recommended Posts

  • Replies 1
  • Views 233
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

Solution: 

1. Add this code as a code injection:

if (navigator.userAgent.includes('Instagram')) { document.body.classList.add('instagram-browser'); }

2. use .instagram-browser before any CSS code you want to apply only to instagram visits. 

You're welcome. 

Example:

/* Custom styles only for Instagram's in-app browser */
.instagram-browser h1 {
  font-size: 32px !important; /* Adjust size for h1 */
}

.instagram-browser h2 {
  font-size: 25px !important; /* Adjust size for h2 */
}

.instagram-browser h3 {
  font-size: 20px !important; /* Adjust size for h3 */
}

.instagram-browser h4 {
  font-size: 18px !important; /* Adjust size for h4 */
}

.instagram-browser .sqsrte-large {
  font-size: 16px !important; /* PARAGRAPH 1 */
}

.instagram-browser p:not(.sqsrte-large):not(.sqsrte-small) {
  font-size: 12px !important; /* PARAGRAPH 2 */
}

.instagram-browser .sqsrte-small {
  font-size: 11px !important; /* PARAGRAPH 3 */
}

/* Custom styles only for Instagram's in-app browser - CONTENT TITLE */
.instagram-browser h2.list-item-content__title {
    font-size: 5vw !important;
  /* Content TITLE SIZE */
  }

This customizez all text types + titles.

Edited by flocosix
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.