How to Use Custom CSS & Code in Squarespace: Pro Designer Tips
Take your website far beyond default templates. Master CSS block targeting, typography loading, frosted glass cards, and micro-animations safely.
While Squarespace's visual editor is exceptional, adding tailored CSS elevates a site from 'looks like a template' to an bespoke digital masterpiece. Here is how professional agencies customize Squarespace safely without interfering with core system updates.
1. Finding Block IDs with Precision
Target individual elements without affecting global styles
Every section, block, and collection on Squarespace has a unique ID (e.g., #block-yui_3_17_2...). Use browser developer tools or the free Squarespace ID Finder Chrome extension to grab exact selectors.
Always scope your CSS rules to either a specific page collection ID or block ID to prevent unintended style leaks across your store or blog.
2. Adding Frosted Glass & Custom Card Elevations
Modern Apple-inspired aesthetics with vanilla CSS
Create luxurious glassmorphism cards with subtle border strokes and backdrop filters using this production-tested snippet:
/* Looksbay Glassmorphism Card Style */
.custom-card-container {
background: rgba(255, 255, 255, 0.75);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid rgba(0, 0, 0, 0.08);
border-radius: 14px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
box-shadow 0.3s ease;
}
.custom-card-container:hover {
transform: translateY(-4px);
box-shadow: 0 20px 40px rgba(0, 119, 237, 0.12);
}3. Importing Custom Brand Fonts (@font-face)
Use high-end bespoke typography beyond Adobe and Google libraries
Upload your .woff2 font files directly into Website > Pages > Custom CSS > Manage Custom Files.
Then declare your font family and bind it to your desired heading or paragraph styles:
@font-face {
font-family: 'CabinetGrotesk';
src: url('https://static1.squarespace.com/static/.../CabinetGrotesk-Bold.woff2') format('woff2');
font-weight: 700;
font-display: swap;
}
h1, h2, .gradient-heading {
font-family: 'CabinetGrotesk', sans-serif !important;
letter-spacing: -0.03em;
}Always use WOFF2 format for web fonts and limit yourself to 2–3 font weights to preserve sub-second page loading speeds.
4. Where to Place Your Code
Custom CSS vs Code Injection vs Code Block
Custom CSS panel: strictly for styling rules. It applies site-wide and doesn't require <style> tags.
Code Injection (Header/Footer): for tracking scripts, Google Analytics tags, and custom external libraries like GSAP.
Code Block: for embedding interactive widgets, HTML forms, or custom iframes directly inside a page canvas.
Conclusion & Next Steps
Custom code turns Squarespace into an unlimited canvas. Keep your CSS organized with comments, test across mobile viewport breakpoints, and you will achieve a truly unique, award-winning web presence.
More Studio Guides
The Ultimate Squarespace SEO Guide: How to Rank #1 on Google in 2025
A complete, actionable roadmap to rank your Squarespace website #1 on Google. In this guide, our studio breaks down proven on-page strategies, keyword architecture, image compression for Core Web Vitals, and technical XML sitemap indexing that turn your site into a continuous client-generation engine.
Must-Know Squarespace Features: Unlocking Fluid Engine, Courses & Beyond
A deep dive into Squarespace's modern feature set. Learn how to leverage Fluid Engine's 24-column grid, member areas, digital product sales funnels, and native AI.
Connecting Printify with Squarespace: The Ultimate Print-on-Demand Setup
A complete guide to building an automated print-on-demand store. Connect your store, sync custom apparel, configure shipping, and automate orders effortlessly.
Ready to love your website?
Tell us what you’re dreaming about. We’re listening.
Let’s talk