JustUpstairs Posted December 15, 2022 Share Posted December 15, 2022 (edited) Hi All, I am using CSS to link a custom font onto my site. When using the standed code, the // in HTTPS:// turns the url into a comment and therefore doesn't link correctly. Removing the https:// then gives me a syntax error. Everyone doing this online doesn't seem to have this issue at all. Any advice? Code I am using is below; @font-face { font-family: 'Curly'; src: url (https://static1.squarespace.com/static/5ffc1ae692e37d47576a1330/t/639b18c36c2d4e7408135839/1671108803929/CCSignLanguage+Bold+Italic.otf); } Thanks! Edited December 15, 2022 by JustUpstairs missed word Link to comment
Beyondspace Posted December 15, 2022 Share Posted December 15, 2022 1 hour ago, JustUpstairs said: Hi All, I am using CSS to link a custom font onto my site. When using the standed code, the // in HTTPS:// turns the url into a comment and therefore doesn't link correctly. Removing the https:// then gives me a syntax error. Everyone doing this online doesn't seem to have this issue at all. Any advice? Code I am using is below; @font-face { font-family: 'Curly'; src: url (https://static1.squarespace.com/static/5ffc1ae692e37d47576a1330/t/639b18c36c2d4e7408135839/1671108803929/CCSignLanguage+Bold+Italic.otf); } Thanks! Does this font work properly when you set it in Css? I try and can still download it from your above link Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
JustUpstairs Posted December 15, 2022 Author Share Posted December 15, 2022 No it doesn't work. In the CSS everything after https:// is seen as a comment and not a URL. The link itself works if you paste into a browser etc... but doesn't in CSS as for some reason its seeing the // as a comment indicator. Link to comment
Solution paul2009 Posted December 15, 2022 Solution Share Posted December 15, 2022 2 hours ago, JustUpstairs said: When using the standard code, the // in HTTPS:// turns the url into a comment and therefore doesn't link correctly. Place the URL in quote marks, as you did with the font name. You'll then see a line that looks something like this: src: url ('https://static1.squarespace.com/static/myurlhere/filename.ext'); Did this help? Please give feedback by clicking an icon below ⬇️ About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity and great design ♥.Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. Content: Links in my posts may refer to SF Digital products or may be affiliate links. Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.Improve your online store with our extensions. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment