Skip to main content

Code reference

Everything you need to extend VARAHI without breaking it.
Theme file tree

The theme's file tree in the Shopify code editor


File map


The CSS token system

Every visual decision resolves to a custom property in snippets/css-variables.liquid. This is the file to edit when you want to add your own tokens or override a fixed one.
Do not hard-code colours in a new section. Use var(--color-…). A hard-coded #00f0ff will not follow your brand when the merchant changes the primary colour.

Adding your own token

Then use it: background: var(--brand-rust-soft);

The JavaScript architecture

Three bundles, each with a clear job.

Rebuilding the bundle

If you edit a source file, rebuild motion.js. The shipped bundle is the unminified concatenation.
The theme loads motion.js directly. Edit theme-motion.js (and the vendor files only when upgrading GSAP), then rebuild motion.js. Never edit a vendor file in place.

The theme-motion modules

assets/theme-motion.js is organised as individually try/caught modules, so one failure never hides the rest of the page.
Every module that touches a specific section is wrapped in a try/catch whose catch calls rescue(...) — which un-hides anything that was hidden. If GSAP throws, the content is still visible. The theme fails open, never closed.

The icon font

VARAHI self-hosts a 5 KB subset of Material Symbols Outlined, containing exactly the 44 glyphs the theme uses.

Supported icon names

Using an icon

If a name is not in the list above, it renders as the raw word, not a glyph. This is the single most common VARAHI support question. To add a glyph, add it to the font subset and rebuild font-24.woff2.

Adding a custom icon

1

Get the glyph

From Google Fonts’ Material Symbols, or any Material Symbols set.
2

Add the name to the subset

Rebuild font-24.woff2 including the new ligature name.
3

Use it

<span class="material-symbols-outlined" aria-hidden="true">your_name</span>

Adding a custom stylesheet

The safe pattern, so an update does not wipe your work.
1

Create the file

assets/custom.css
2

Link it

In layout/theme.liquid, next to the other styles:
3

Keep it small

A separate file is one extra request. If your CSS is under about 5 KB, inline it into the <style> block instead.

Snippets you will use


Custom sections

Build your own section from scratch.

Performance

The budgets your custom code has to respect.