Advanced & Agency Notes
Technical reference for web developers, Shopify partners, and agencies customizing Crumbelle beyond the theme customizer.
The instructions on this page are intended for web designers, agencies, and developers comfortable with CSS, Liquid syntax, and Shopify CLI. Merchants do not need to perform these steps to build or run their store.
1. Adding Custom CSS Safely
To ensure your custom CSS rules survive future theme updates, we strongly recommend using Shopify's native Custom CSS panels rather than editing core stylesheet files directly.
Sitewide Custom CSS
Go to Theme settings (gear icon) > Custom CSS. Any rules written here are loaded globally across every page.
Section-Specific Custom CSS
Every individual section in Crumbelle (Header, Footer, Slideshow, etc.) contains a dedicated Custom CSS input at the bottom of its settings panel. Use the & selector to scope styles directly to that section container:
/* Example: Scoped styling inside a section */
& {
border-top: 2px solid var(--primary);
}
& .section-title {
text-transform: uppercase;
letter-spacing: 2px;
}
2. CSS Custom Properties Architecture
Crumbelle centralizes its design tokens in snippets/css-variables.liquid. When theme settings or presets change in the customizer, the snippet automatically recalculates and injects the following CSS custom properties into :root:
| CSS Variable | Source Setting in Theme Customizer | Scope |
|---|---|---|
--color-body-bg |
settings.color_body_bg |
Global canvas background. |
--color-btn-primary |
settings.color_btn_primary |
Primary button background color. |
--color-btn-text |
settings.color_btn_text |
Primary button text. |
--font-heading-family |
settings.title_font.family |
Heading font family token. |
--font-body-family |
settings.body_font.family |
Body text font family token. |
--global-button-border-radius |
settings.global_button_border_radius |
Button corner radius in pixels (0–40px). |
--global-card-border-radius |
settings.global_card_border_radius |
Product and banner card radius (0–40px). |
3. Section Rendering API Integration
Crumbelle utilizes Shopify’s AJAX Section Rendering API to update storefront components dynamically without full-page reloads:
- Cart Drawer Updates: When an item is added or quantity is altered, JavaScript requests updated HTML fragments for:
cart-drawer.liquid(the updated line items and total)sections/cart-products-count.liquid(header bag badge counter)sections/cart-live-region-text.liquid(accessible screen reader subtotal announcement)
- Facet Filtering: Filtering collections triggers dynamic fetching of
sections/collection.liquid, replacing only the product grid and facet bar.
4. Editing Locale Strings Directly
Agencies deploying multi-regional storefronts can edit the translation dictionaries in locales/ directly:
locales/en.default.json: Primary storefront strings.locales/en.default.schema.json: Theme customizer schema labels and setting descriptions.locales/ar.json,de.json,es.json,fr.json,pt-BR.json,pt-PT.json: Regional translations.
5. Theme Metafields Architecture & API Provisioning
Because Shopify themes cannot automatically create store database metafield definitions upon install, developers and merchants configure them once under Settings > Custom data, or provision them via the Shopify Admin GraphQL API.
Complete Theme Metafields Table
| Resource | Field Name | Namespace & Key | Type | Description |
|---|---|---|---|---|
| Blog Post | Related products | custom.related_products |
List of products | Curated products shown in the article sidebar (up to 3). |
| Blog Post | Author | custom.author |
Single-line text | Custom author name displayed above article body. |
| Blog Post | Author Bio | custom.author_bio |
Multi-line text | Biographical note displayed in the author card. |
| Blog Post | Author Photo | custom.author_photo |
File (Image) | Circular avatar portrait of the author. |
| Product | Custom Badge Label | my_fields.custom_label |
Single-line text | Custom highlight badge over product card (e.g. "Trending"). |
| Product | Deal Countdown | my_fields.countdown |
Date and time / Text | Target countdown timestamp (e.g. 2026/12/31 23:59:59). |
| Product | Amazon ASIN | custom.amazon_asin |
Single-line text | Direct affiliate / external marketplace link on product page. |
| Product | 360 Spin Images | my_fields.threesixty_rotate_images |
File / Text | Interactive 360-degree rotating frame sequence. |
| Product | Product Video | my_fields.video |
URL / Text | Embedded product video showcase. |
Automated Provisioning via GraphQL Admin API
Agencies can provision all article definitions in one request using the Shopify CLI or Shopify GraphiQL app:
mutation ProvisionArticleMetafields {
relatedProducts: metafieldDefinitionCreate(
definition: {
name: "Related Products"
namespace: "custom"
key: "related_products"
type: "list.product_reference"
ownerType: ARTICLE
}
) { createdDefinition { id name } }
authorName: metafieldDefinitionCreate(
definition: {
name: "Author Name"
namespace: "custom"
key: "author"
type: "single_line_text_field"
ownerType: ARTICLE
}
) { createdDefinition { id name } }
authorBio: metafieldDefinitionCreate(
definition: {
name: "Author Bio"
namespace: "custom"
key: "author_bio"
type: "multi_line_text_field"
ownerType: ARTICLE
}
) { createdDefinition { id name } }
authorPhoto: metafieldDefinitionCreate(
definition: {
name: "Author Photo"
namespace: "custom"
key: "author_photo"
type: "file_reference"
ownerType: ARTICLE
}
) { createdDefinition { id name } }
}