Jump to content

Syntax Error on Line 5 in CSS Custom Code

Recommended Posts

We have recently updated from 7.0 to 7.1 and I Squarespace says that the scaling font not working for us in 7.1 is due to something wrong in our CSS, so I am trying to troubleshoot that issue. I am getting a "syntax error on line 5"  which prefaces remove the hyphens in the h1, h2, h3. I thought maybe the CSS in this section was outdated so I replaced it and it appears to still give the "syntax error on line 5". I have deleted line, and then it will say syntax error on line 6.

Previous code:

LINE 5: /* Remove Hyphens on Text Styles */

h1, h2, h3, p, a {

  -webkit-hyphens: none !important;

  -ms-hyphens: none !important;

  hyphens: none !important;

}

/* Increase H2 Font Weight Over Banner Images */

.Index-page--has-image h2 {

  font-weight: 600;

}

NEW CODE:

/* Remove Hyphens on Text Styles */
p, h1, h2, h3, h4 {
 -webkit-hyphens: manual !important;
-moz-hyphens: manual !important;
-ms-hyphens: manual !important;
hyphens: manual !important;
}

/* Increase H2 Font Weight Over Banner Images */
.Index-page--has-image h2 {
  font-weight: 600;
}

Link to comment
  • Replies 2
  • Views 347
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

35 minutes ago, creative-designs-by-renee said:

/* Remove Hyphens on Text Styles */
p, h1, h2, h3, h4 {
 -webkit-hyphens: manual !important;
-moz-hyphens: manual !important;
-ms-hyphens: manual !important;
hyphens: manual !important;
}

/* Increase H2 Font Weight Over Banner Images */
.Index-page--has-image h2 {
  font-weight: 600;
}

There are no syntax errors in this code.

Do you have anything else in Custom CSS?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

Please post the URL for a page on your site where we can see your issue. For us to see the URL you need to include the link in the content of your post. The URL field the forum software provides is not shown to us.

A link to the backend of the your site won’t work for us, i.e. a URL that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site.

Please read the site-wide password and how to share a link documentation to understand how they work.

You may find How to post a forum question post useful.

We can then take a look at your issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.