LogoLogo
Manifold for Developers
Manifold for Developers
  • Introduction
  • Shopify Merch Bridge
    • Overview
    • Tutorial
      • Step 1: Product Gate Setup
        • 1.1: Configure the Product
        • 1.2: Install Manifold Merch Bridge
        • 1.2: Create a New Product Gate
        • 1.3: Link a Product to the Gate
        • 1.4: Add Rules
      • Step 2: Store Theme Setup
        • 2.1 The Theme Editor
        • 2.2 Product Page Setup
        • 2.3 Cart Page Setup
    • Advanced Configuration
    • FAQ / Error Help
    • Reference
      • Product and Gate Configuration
        • Shopify Products
        • Product Gates
          • Gate Products
          • Rules
      • Custom Themes
      • Updating to the Latest Version
      • UI Configuration Options
      • Advanced Usage
      • Common Issues
  • Guides
    • Getting Started
    • HTML
    • React
    • NextJS
    • Vue
    • Wix
    • Squarespace
      • Simple Squarespace Site
      • Customised Squarespace Template
  • Resources
    • Apps
      • Grant Types
    • Widgets
      • Directory
      • Manifold CSS Variables
        • Scheme Utility Classes
        • List of Manifold CSS Variables
      • Connect Widget
        • Blockchain Interaction
        • Wallet Authentication
        • Data Client
          • NFT Information Retrieval
            • getNFT
            • getNFTsOfOwner
            • ownerHasNFT
            • getCollectors
          • Data Storage and Retrieval
        • Advanced Configuration
        • Customization & Styling
        • Automatic Error Handling
      • Campaign Widget
        • Campaign Creation
          • Questionnaire
        • Campaign Progress
        • Customization & Styling
      • Curation Widget
      • Marketplace Widgets
        • Widgets
          • Data Attributes
          • Layout Widgets
          • Card Widgets
          • Listing Widgets
        • Window Events
        • Troubleshooting
        • Customization & Styling
        • Version Change Notes
          • 3.2.1 - CSS Selector Changes
          • 3.1.1 - CSS Selector Changes
      • Claim Widgets
        • Widgets
          • Data Attributes
          • Complete Claim Widget
          • Buy Button Only Widget
          • Mint Count Widget
        • Troubleshooting
        • Customization & Styling
        • Version Change Notes
          • 1.7.0, 1.7.1 - CSS Selector Changes
      • Restricted Token Widget
        • Customization & Styling
      • Wallet Identity Widget
        • Customization & Styling
      • Subscription Widget
      • 6551 Display Widget
    • Manifold Ethereum Provider
  • Tools and APIs
    • Merkle Tree Tool
    • Snapshot Tool
    • Discord Tools
    • Server-Side Session Authentication
      • Signature Grant
      • Authorization Code Grant
  • Smart Contracts
    • Manifold Creator
      • Contracts
        • Creator Core
          • Common Functions
          • ERC721 Functions
          • ERC1155 Functions
        • Extensions
          • Extensions Functions
          • Extensions Examples
          • Extensions Deployment Guide
            • Dynamic NFT Extension
            • Lazy Mint Extension ERC1155
            • Lazy Mint Extension ERC721
        • Mint Permissions
          • Mint Permissions Functions
      • Prior Versions
        • 1.0.x
          • Creator Core
            • Common Functions
            • ERC721 Functions
            • ERC1155 Functions
          • Extensions
            • Extensions Functions
            • Extensions Examples
            • Extensions Deployment Guide
              • Dynamic NFT Extension
              • Lazy Mint Extension ERC1155
              • Lazy Mint Extension ERC721
          • Mint Permissions
            • Mint Permissions Functions
        • 2.0.x
          • Creator Core
            • Common Functions
            • ERC721 Functions
            • ERC1155 Functions
          • Extensions
            • Extensions Functions
            • Extensions Examples
            • Extensions Deployment Guide
              • Dynamic NFT Extension
              • Lazy Mint Extension ERC1155
              • Lazy Mint Extension ERC721
          • Mint Permissions
            • Mint Permissions Functions
    • Marketplace
      • Identity Verifier
    • Royalty Registry
  • Contact Us
Powered by GitBook
On this page
  • Light Scheme Defaults
  • Dark Scheme Defaults
  • Additional Readings

Was this helpful?

  1. Resources
  2. Widgets
  3. Manifold CSS Variables

Scheme Utility Classes

By default, widgets that implement Manifold CSS variables derive a "light" or "dark" mode according to the user's colour scheme preferences. Two additional utility classes are provided to easily enforce and switch between "light" and "dark" schemes.

The .manifold-scheme-light and .manifold-scheme-dark utility classes allow developers to quickly and easily change their widget's styling depending on the specific color scheme they are using. These classes work in conjunction with the Manifold CSS variables to provide a way to switch between different themes without having to manually adjust each element's styling. When assigned to the :root selector, these classes will override the default color scheme of the page and apply the appropriate colors based on the chosen color scheme. This enables easy manipulation of colors and other styling elements, while also ensuring that the page looks consistent regardless of the end-user's colour scheme preference.

.manifold-scheme-light and .manifold-scheme-dark may also be applied directly to the HTML element with the data-widget attribute. In such a case, the widget will take on the specified colour scheme without the rest of the page being affected. It is suggested to place these utility classes on the root html tag when using layout widgets (Marketplace, Campaign).

Light Scheme Defaults

.manifold-scheme-light {
  --manifold-theme--color--primary: hsl(0deg, 0%, 0%);
  --manifold-theme--color--secondary: hsl(0deg, 0%, 95%);
  --manifold-theme--color--success: hsl(120deg, 57%, 53%);
  --manifold-theme--color--error: hsl(0deg, 57%, 53%);
  --manifold-theme--color--warning: hsl(33deg, 65%, 51%);
  --manifold-theme--color--info: hsl(234deg, 82%, 71%);
  --manifold-text--color--primary: hsl(0deg, 0%, 100%);
  --manifold-text--color--secondary: hsl(0deg, 0%, 30%);
  --manifold-text--color--muted: hsla(0deg, 0%, 0%, 0.66);
  --manifold-text--color--disabled: hsla(0deg, 0%, 0%, 0.55);
  --manifold-text--color--body: hsla(0deg, 0%, 0%, 0.87);
  --manifold-border--color: hsl(0deg, 0%, 90%);
  --manifold-page--color--background: hsl(0deg, 0%, 100%);
  --manifold-element--color--background: hsl(0deg, 0%, 100%);
}

Dark Scheme Defaults

.manifold-scheme-dark {
  --manifold-theme--color--primary: hsl(0deg, 0%, 100%);
  --manifold-theme--color--secondary: hsl(0deg, 0%, 10%);
  --manifold-theme--color--success: hsl(120deg, 50%, 32%);
  --manifold-theme--color--error: hsl(0deg, 50%, 32%);
  --manifold-theme--color--warning: hsl(33deg, 52%, 41%);
  --manifold-theme--color--info: hsl(234deg, 36%, 54%);
  --manifold-text--color--primary: hsl(0deg, 0%, 0%);
  --manifold-text--color--secondary: hsl(0deg, 0%, 79%);
  --manifold-text--color--muted: hsla(0deg, 0%, 100%, 0.6);
  --manifold-text--color--disabled: hsla(0deg, 0%, 100%, 0.48);
  --manifold-text--color--body: hsla(0deg, 0%, 100%, 0.87);
  --manifold-border--color: hsl(0deg, 0%, 42%);
  --manifold-page--color--background: hsl(0deg, 0%, 7%);
  --manifold-element--color--background: hsl(0deg, 0%, 20%);
}

Additional Readings

Last updated 2 years ago

Was this helpful?

MDN's section about CSS variable inheritance