Home
Wiki
Home
Wiki
  1. 1. Structure
  • Back to home
  • 1. Themes
  • Vs Code
    • Getting Started
  • Kitchenware
    • Layout
      • New Layout
      • Legacy Layout
    • Components
      • Announcement
      • Banner Carousel
      • Banner With Products Carousel
      • Blog Category List
      • Blog List
      • Brand List
      • Brands Carousel
      • Breadcrumb
      • Call To Action
      • Cart
      • Categories List
      • Change Password
      • Checkout
      • Cookie Manager
      • Filter list
      • Footer
      • Forgot Password
      • Form
      • Hero Carousel
      • Icon Block
      • Invitation
      • Last Visited Products
      • Layout
      • Login
      • Map
      • Nav Bar
      • Offer
      • Product Attachments
      • Product Attributes
      • Product Documentation
      • Product Expected
      • Product Modal
      • Products Block
      • Products Carousel
      • Product Single
      • Profile
      • Quote
      • Register
      • Related Products
      • Search
      • Stores
      • Subscribe Newsletter
      • Text with Image
      • Top Bar
      • Video
    • Reusables
      • Getting Started
    • Assets
      • Getting Started
    • SDK
      • Products
        • _findProductsByCategory
        • _findProductsByIds
        • _findProductsByTitle
        • _findProductsByFilter
        • _findProductsByCriteria
        • _findProductsAndCalculate
        • _findProductsThenCalculate
        • _getProductAttributeSet
        • _setLastVisited
      • Categories
        • _findCategoryTreeById
        • _findCategoriesByIds
        • _findCategoryByAlias
        • _findCategoryTreeByAlias
        • _getCategoryContent
      • Collections
        • _getCollectionContent
        • _findCollectionsByIds
        • _findCollectionsByIdsThenCalculate
      • Brands
        • _getBrandContent
        • _findBrandsByIds
      • Cart
        • _addToCartMulti
        • _addToCart
        • _setCart
        • _clearCart
        • _setCartListener
        • _removeFromCart
        • _calculateCart
      • Checkout
        • _startCheckout
        • _updateCheckout
        • _completeCheckout
      • Shopping Lists
        • _getShoppingLists
        • _updateShoppingList
        • _createShoppingList
        • _deleteShoppingList
        • _getShoppingListByAlias
      • Navigation
        • _getFooterMenu
        • _getHeaderMenu
      • Users
        • _getUserById
      • Utils
        • _calculateCurrency
        • _getCurrencySymbol
        • _getCulture
        • _subscribeToNewsletter
        • _findUnitsByIds
  • Noir
    • 0. Introduction
    • 1. Structure
      • Overview
      • LayoutA.liquid
      • ComponentsList.liquid
      • Metas.liquid
      • CssVariables.liquid
      • Json.liquid
      • GoogleTagManager.liquid
      • StagingButton.liquid
    • 2. Components
      • Overview
      • Announcement
      • BannerCarousel
      • BlogCategoryList
      • BlogList
      • BrandList
      • Breadcrumb
      • Cart
      • CategoriesList
      • ChangePassword
      • Checkout
      • CookieManager
      • FilterList
      • Footer
      • ForgotPassword
      • Form
      • IconBlock
      • Invitation
      • LastVisitedProducts
      • Login
      • Map
      • NavBar
      • ProductAttachments
      • ProductAttributes
      • ProductComparison
      • ProductDocumentation
      • ProductMixList
      • ProductsBlock
      • ProductsCarousel
      • ProductSingle
      • Profile
      • Register
      • RelatedProducts
      • SingleBlog
      • Stores
      • TextWithImage
      • ThankYouPage
      • TopBar
      • Wishlist
    • 3. Reusables
      • Overview
      • Addresses
      • BillingRetail
      • AddressForm
      • AnnouncementModal
      • BackToTop
      • Company
      • General
      • Login
      • LoginModal
      • Orders
      • Payment
      • ProductAttachments
      • ProductAttributes
      • ProductComparisonButton
      • ProductComparisonFloatingButton
      • ProductGridItem
      • ProductListItem
      • ShoppingListsButton
      • ProductModal
      • ProfileInfo
      • PromptModal
      • Register
      • Shipping
      • ShoppingLists
      • ShoppingListsNavbar
      • Toast
      • Users
      • VariantContent
      • WishlistButton
      • Services
    • 4. Assets
      • Fonts
      • Images
      • Templates
      • Javascript
        • Overview
        • theme.js
      • Css / Scss
        • Overview
        • ThemeClasses
    • 5. SDK
      • Overview
      • LiquidGlobals
      • ServicesSDK
  1. 1. Structure

CssVariables.liquid

Purpose#

CssVariables.liquid outputs theme-level CSS variables (custom properties) that are used across Noir for consistent theming.
This is the main place where the theme exposes values such as colors (palette), backgrounds, and other design tokens into CSS so that:
components can stay mostly “utility-class + variables” driven,
theming changes propagate globally without editing many templates,
dark mode and store-specific styling can be handled centrally.

Where it's used#

CssVariables.liquid is rendered inside the <head> of the main layout:
LayoutA.liquid
Example (from the layout):
{% render 'Structure\\CssVariables' with GlobalData.Settings as Settings %}
This means every page rendered with LayoutA.liquid will receive the same CSS variable setup.

Inputs#

CssVariables.liquid is rendered “with” GlobalData.Settings as Settings.
So inside this file you can expect to use:
Settings.*
Theme/store settings required to generate CSS variables (palette colors, flags, etc.).
Note
The specific settings keys depend on what the platform provides in GlobalData.Settings.

Output#

The file is expected to output CSS variables, typically in one of these formats:
A <style> block with :root { --var: value; }
Optionally additional selectors, e.g. .dark { ... } for dark mode overrides
Typical output concept (example only):
:root {
  --color-primary: ...;
  --header-bg: ...;
}
.dark {
  --color-primary: ...;
}

How variables are used in Noir#

Once variables are declared, they can be consumed by:
Tailwind arbitrary values (e.g. text-[var(--...)], bg-[var(--...)]) if the project uses that pattern
custom CSS inside scss
component templates when inline styles are required (prefer variables over hardcoded colors)

Do not change (by default)#

In Noir, CssVariables.liquid should be treated as core infrastructure and a stable contract between the platform's theming settings and the theme.
Default rule: do not modify this file.
If you need styling changes, prefer (in this order):
1.
Admin panel palette / theme settings (the intended way)
2.
Custom CSS (small overrides)
3.
Template-level adjustments (Tailwind classes / markup)

Allowed reasons (exception-only)#

Only consider changing CssVariables.liquid when all of the below are true:
the required design cannot be achieved through Admin palette/settings, and
Custom CSS overrides are not sufficient, and
the change must be applied globally as a reusable token (affects many components consistently), and
you accept that CSS variables behave like a public API (changes can have broad impact)
If you're unsure, don't change itβ€”document the requirement and escalate to core/theme owners.
Modified at 2026-04-14 13:18:56
Previous
Metas.liquid
Next
Json.liquid
Built with