Byte Digital Themes

Custom CSS

Overriding theme styles without editing core files.

Updated 2026-05-09

The simplest way to customize visuals without forking the theme.

Where to add it

Theme settings → Custom CSS (text area). Whatever you paste is appended at the end of the global CSS, so it overrides theme rules without specificity tricks.

Avoid editing files in assets/. Custom CSS in settings survives theme updates; file edits don't.

CSS variables reference

The colour tokens are scheme-aware — they resolve to whichever color_scheme is active on the element's section / parent. So var(--color-accent) inside a .color-scheme-3 block uses scheme 3's accent, automatically.

Colour & surface

TokenPurpose
--color-backgroundActive scheme background
--color-foregroundActive scheme text
--color-accentActive scheme accent
--color-linkActive scheme link colour
--color-borderActive scheme border / divider
--color-overlayModal / drawer backdrop tint
--color-text-secondaryMuted secondary text
--color-page-backgroundDocument body background (independent of any scheme)

Motion

TokenPurpose
--motion-durationGlobal transition duration. Resolves to 0ms when motion_enabled is off.
--motion-ease, --easeGlobal easing curves

Shadows

TokenPurpose
--shadow-cardDefault card elevation
--shadow-card-hoverCard elevation on hover (when "Lift cards on hover" is on)
--shadow-drawerCart drawer, quick view, dropdown panels

Radius

TokenPurpose
--radius-buttonButtons
--radius-inputForm inputs + <select>
--radius-badgeBadges
--radius-cardProduct cards
--radius-collection-cardCollection cards
--radius-blog-cardBlog cards
--radius-imageImage blocks
--radius-drawerCart drawer, quick view, mega menu

Layout & header geometry

TokenPurpose
--container-maxBoxed container max-width
--page-gutterclamp(20px, 4vw, 80px) horizontal page padding
--header-heightVisible header bar (measured at runtime)
--header-group-heightFull header group height
--announcement-heightAnnouncement bar alone — drives sticky offset

Typography

TokenPurpose
--font-heading-family, --font-body-family, --font-nav-family, --font-caption-familyActive font roles
--font-size-h1--font-size-h6Per-tag heading sizes
--font-size-md, --font-size-sm, --font-size-label, --font-size-captionBody / small / label / caption scale
--letter-spacing-nav, --letter-spacing-label, --letter-spacing-buttonTracking values
--tt-nav, --tt-label, --tt-buttonUppercase toggles — resolve to uppercase or none

Spacing

Tokenpx
--sp-18
--sp-216
--sp-324
--sp-432
--sp-548
--sp-664
--sp-780
--sp-8120

Per-section scheme classes

Each section gets a .color-scheme-N class wrapping its root, set by the section's color_scheme picker. To scope custom CSS to only sections set to a given scheme:

.color-scheme-3 .my-custom-block {
  border: 1px solid var(--color-border);
}

That rule paints --color-border from scheme 3 wherever the block appears, and is inert in sections using any other scheme.

Body class reference

Targeting <body> is the easiest way to scope by global style — handy because Shopify's section grouping makes element-level targeting brittle.

ClassSet by
style-button--<style>Primary button shape
style-card--<style>Product card style
style-card-align--<align>Product card text alignment
style-collection-card--<style>Collection card style
style-collection-card-align--<align>Collection card alignment
style-blog-card--<style>Blog card style
style-blog-card-align--<align>Blog card alignment
style-input--<style>Form input variant (underline / bordered / filled / filled-pill)
style-shadow-hoverPresent when "Lift cards on hover" is on
header-is-stickyPresent when the header has the sticky setting on
template-<name>, template-<name>--<suffix>Shopify standard, for per-template overrides

Common overrides

/* Tighter section padding everywhere */
.shopify-section { --pad-top: 48px; --pad-bottom: 48px; }

/* Wider lookbook on desktop */
@media (min-width: 1200px) {
  .lookbook__frame { padding: 0 var(--sp-5); }
}

/* Custom focus outline using the active scheme's accent */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Heavier shadow for product cards on a specific scheme */
.color-scheme-2 .product-card { box-shadow: var(--shadow-card-hover); }

Tips

  • Use :where() to keep your specificity flat — :where(.section-name) {} has zero specificity, easy to override later.
  • Test changes in preview mode before publishing.
  • Keep custom CSS under ~200 lines. If it's longer, commission a proper theme code change.
Need a hand? Contact support.