Looksbay
Back to all guides
Custom Code•Apr 14, 2025•7 min read

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.

Marcus Vance
Marcus VanceLead Front-End Architect at Looksbay
Clean CSS code on an ultra-wide developer monitor
Key Takeaway

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:

cssReady to paste into Custom CSS
/* 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:

cssReady to paste into Custom CSS
@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;
}
Performance Warning

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.

Topics:Custom CSSCSS TricksSquarespace DevelopmentAnimations
The beginning of something good

Ready to love your website?

Tell us what you’re dreaming about. We’re listening.

Let’s talk