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
    • 6. FAQ
    • 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
      • Offer
      • ProductAttachments
      • ProductAttributes
      • ProductComparison
      • ProductDocumentation
      • ProductMixList
      • ProductsBlock
      • ProductsCarousel
      • ProductSingle
      • Profile
      • Quote
      • Register
      • RelatedProducts
      • SingleBlog
      • Stores
      • TextWithImage
      • ThankYouPage
      • TopBar
      • Wishlist
    • 3. Reusables
      • _Overview
      • Addresses
      • AddressForm
      • AnnouncementModal
      • BackToTop
      • BillingRetail
      • Company
      • General
      • Login
      • LoginModal
      • MonthlyTransactions
      • Offers
      • Orders
      • Payment
      • ProductAttachments
      • ProductAttributes
      • ProductComparisonButton
      • ProductComparisonFloatingButton
      • ProductGridItem
      • ProductListItem
      • ProductModal
      • ProfileInfo
      • PromptModal
      • Quotes
      • Register
      • Services
      • Shipping
      • ShoppingLists
      • ShoppingListsButton
      • ShoppingListsNavbar
      • Toast
      • Transactions
      • Users
      • VariantContent
      • WishlistButton
    • 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 is rendered with GlobalData.Settings as Settings.
So inside this file you can expect to use: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.e
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.colors.*
Palette colors for light mode (e.g. primary, secondary, accent, backgroundPrimary, linkText, secondaryButton) including their *Hovered / *Selected / *Disabled states.
Settings.colors.dark*
Equivalent palette for dark mode (e.g. darkPrimary, darkBackgroundPrimary, …).
Settings.fontFamily
The theme font family.
Settings.siteStyle
Controls the global --border-radius token (see Output below).
Note
The specific settings keys depend on what the platform provides in GlobalData.Settings.

Output#

The file outputs a single <style> block declaring CSS custom properties on :root.
Important: dark mode is not handled with a separate .dark { ... } selector here. Instead, both light and dark tokens are declared together on :root (the dark ones are prefixed with --dark-), and consumers choose which set to use.
Typical output concept (example only):
The --border-radius token is derived from Settings.siteStyle:
"Rounded" → 1.5rem
"Standard" → .5rem
otherwise → 0

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-06-12 12:28:42
Previous
Metas.liquid
Next
Json.liquid
Built with