Jump to content

Calc function for text

Recommended Posts

Posted

Site URL: https://corn-apricot-zn88.squarespace.com/

Hello 

 

I am trying to use the following formula to makee my home page text responsive. Min font size is 22 px max is 66px. I think for SS i have to add ~ and ", but I am not sure where to put it. My calc never seems to work. 

#block h2{ font-size: calc(22px + (66- 22) * ((100vw - 300px) / (2200 - 300))); }

 

Thank you! 

 

  • Replies 1
  • Views 769
  • Created
  • Last Reply
Posted
4 hours ago, deaton72 said:

Site URL: https://corn-apricot-zn88.squarespace.com/

Hello 

 

I am trying to use the following formula to makee my home page text responsive. Min font size is 22 px max is 66px. I think for SS i have to add ~ and ", but I am not sure where to put it. My calc never seems to work. 

#block h2{ font-size: calc(22px + (66- 22) * ((100vw - 300px) / (2200 - 300))); }

 

Thank you! 

 

I used this trick and it work

CSS3 calc() in LESS CSS (Example) (coderwall.com)

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.