Jump to content

Inherit global styles into CSS

Recommended Posts

I'm creating some Squarespace templates to sell on Creative Market. I'm interested in creating more advanced ones where I utilise custom CSS more. 

The only road block I'm having is trying to make it so that the purchaser doesn't actually have to touch much of the code. Mostly. it's when they're applying their own branding - colours and fonts - where they need to get into the code and edit it to their own hex codes. 

I'm wanting to know if there's a way to make it so that we can call on the global styles within our CSS? So for example, whatever font family they've set for headings, can be called on like this in the CSS? 

For example, this is what I do in Shopify:

font-family:var(--typeHeading)!important;

Is there a Squarespace equivalent?

Thanks!

Link to comment
  • 1 year later...

A member just asked me via email, she sent this thread so I posted below

Each theme style, it has some variant style

For example Lightest 1
image.png
It has some already variant 
image.png
image.png
image.png
about 200+ variant attributes
image.png
image.png
 
You can also create custom variant, something like this
@linkBGColor: red;
@linkTextColor: #fff;
 
then when use CSS, just declare
h1 {color: @linkBGColor;}
image.thumb.png.6103ec4b9d43aa869b4bd34aec0b762e.png
Edited by tuanphan

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...

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.