Kenneth D'SilvaMODRACX
Start a project

← Documentation Hub

Pascal Shopify Theme: Reference Manual

A performance-first, design-system-first, conversion-first Shopify theme engineered in the editorial register of high fashion. Built with strict performance budgets, zero global JavaScript, tokenized CSS variables, and native custom Web Components.

1. Architectural Philosophy: The Three Tenets

Most commercial Shopify themes begin as design templates and accumulate JavaScript plugins over years of feature creep. The outcome is storefront bloat: bloated bundle weights exceeding 400KB of JavaScript, render-blocking stylesheets, and failing Core Web Vitals (INP and LCP).

Pascal was built from a clean slate on three non-negotiable architectural axioms:

  • Zero Global JavaScript: The entire baseline theme renders and operates using only semantic HTML and CSS. There is no monolithic global script bundle. JavaScript is isolated into discrete, self-contained custom Web Components that are only requested when a specific section is rendered.
  • Design System, Not a Template: Components never invent arbitrary values. Every layout primitive, spacing tier, typography scale, shape radius, and color derivation connects directly to a central design token engine (assets/tokens.css).
  • Progressive Enhancement: Every interactive feature—from the product gallery to the slide cart drawer, variant picker, and search—has a 100% functional fallback when JavaScript is disabled or delayed.

2. Performance Budget & Core Web Vitals

Every asset in Pascal is benchmarked against real-world mobile device constraints and strict Core Web Vitals thresholds:

Asset Group / Metric Performance Budget Pascal Measured Result Architectural Mechanism
Global CSS < 15 KB ~11.8 KB uncompressed tokens.css + base.css; component styles loaded per-section
Global JavaScript 0 KB 0 KB Zero render-blocking scripts; 100% modular component imports
Product Page Total JS < 20 KB ~14.5 KB uncompressed Discrete custom Web Components only (e.g. product-form.js)
Third-Party Dependencies 0 KB 0 KB Native browser APIs, zero external NPM vendor libraries
Largest Contentful Paint (LCP) < 2.5s Passing (1.2s - 1.6s) High fetchpriority on LCP hero media; native responsive srcset
Interaction to Next Paint (INP) < 200ms Passing (< 45ms) Lightweight event delegation, zero long tasks on main thread
Cumulative Layout Shift (CLS) < 0.1 0.00 Explicit aspect-ratio reservation on all image placeholders

3. Design System Token Pipeline

Pascal organizes styles into a unidirectional CSS architecture that prevents cascading conflicts and specificity wars:

assets/tokens.css → snippets/css-vars.liquid → assets/base.css → component-*.css → section-*.css

3.1. Palette & Materiality

  • Warm Ground: Ivory surface tone (#f3f0e9) and plate tone (#e8e2d6) designed to feel tactile like heavy archival paper.
  • Rich Ink: Deep charcoal (#1c1b19) delivering optimal contrast ratios without the harsh glare of pure black.
  • Bronze Accent: Distinct burnished gold (#c49a45) reserved strictly for focus rings, hover indicators, and sale badges.
  • Elevation: Soft, low-contrast shadows and frosted glass backdrops (backdrop-filter: blur(12px)) rather than opaque heavy borders.

3.2. Editorial Typography

Combines Fraunces display headings at light weights with tight letter tracking (-0.03em) for high-fashion editorial presence, paired with Jost for clean, legible body text and form controls.

4. Modular Web Component Catalog

Pascal replaces sprawling monolithic theme scripts with discrete, standardized custom Web Components extending HTMLElement:

Web Component Tag Script File Responsibility Zero-JS Fallback
<product-form> product-form.js AJAX cart additions, inventory checks, drawer dispatch Standard HTML form POST to /cart/add
<cart-drawer> cart-drawer.js Sliding sheet modal based on native HTML <dialog> Standard navigation to /cart page
<cart-items> cart-items.js In-place line-item DOM morphing and subtotal recalculation Full page reloads on cart quantity form submit
<variant-picker> variant-picker.js Synchronizes option selection, media gallery, and URL query state Standard HTML radio inputs and dropdown selects
<quick-add-modal> quick-add.js Dynamic Section Rendering API modal for quick cart additions Direct hyperlink to product details page
<predictive-search> predictive-search.js Debounced live search query suggestions and thumbnail results Standard HTML search form submitting to /search
<bundle-builder> bundle-builder.js Interactive bundle builder & batch Add-to-Cart for looks Collection product grid with individual product links
<wishlist-button> wishlist.js Client-side local storage wishlist manager and heart toggle Gracefully hides when offline or unsupported
<share-cart> share-cart.js Permanent Shopify cart permalinks via Web Share API Read-only cart URL display
<shipping-cutoff> shipping-cutoff.js Live dynamic countdown timer until same-day dispatch cutoff Static dispatch policy copy
<before-after-slider> before-after.js Touch-enabled split-screen image comparison slider Side-by-side static comparison images

5. Quick Start & Shopify Theme Development

Pascal is structured for modern Shopify CLI 3.x workflows and Shopify Theme Check linter standards:

# Clone repository
git clone https://github.com/Modracx/Pascal.git
cd Pascal

# Start local development server with hot-reloading
shopify theme dev --store your-store.myshopify.com

# Run official Shopify Theme Check linter
shopify theme check

# Push directly to an unpublished theme slot for preview
shopify theme push --unpublished

6. Out-of-the-Box Features & Platform Support

  • Internationalization (i18n): Includes full storefront translations for 17 languages (English, German, French, Spanish, Italian, Portuguese [BR/PT], Dutch, Japanese, Simplified Chinese, Traditional Chinese, Korean, Swedish, Danish, Norwegian, Finnish, Polish).
  • B2B & Wholesale Support: Built-in volume pricing tables, quantity rules, and increment steppers.
  • Subscriptions: Native integration with Shopify Selling Plans and purchase option selectors (snippets/purchase-options.liquid).
  • Customer Privacy: Zero unvetted third-party tracking scripts; 100% compliant with Shopify's native consent management API.
  • Gift Card Recipients: Complete gift card customization forms including personalized notes and scheduled delivery dates.