Skip to content

Conversation

@vincentfretin
Copy link
Contributor

@vincentfretin vincentfretin commented Dec 8, 2025

Use css variables to support adding a theme switcher. (in a separate PR #835)
The variables names are those from https://daisyui.com so if your website is using daisyui, the inspector will be in your theme colors.

Example, if you have on your page

    <style>
      /* You can also create your theme with https://daisyui.com/theme-generator
       * The default theme will be in this case your generated theme and not the aframe default theme.
       */
      :root {
        color-scheme: light;
        --color-base-100: oklch(100% 0 0);
        --color-base-200: oklch(93% 0 0);
        --color-base-300: oklch(86% 0 0);
        --color-base-content: oklch(22.389% 0.031 278.072);
        --color-primary: oklch(58% 0.158 241.966);
        --color-primary-content: oklch(100% 0 0);
        --color-secondary: oklch(55% 0.046 257.417);
        --color-secondary-content: oklch(100% 0 0);
        --color-accent: oklch(60% 0.118 184.704);
        --color-accent-content: oklch(100% 0 0);
        --color-neutral: oklch(0% 0 0);
        --color-neutral-content: oklch(100% 0 0);
        --color-info: oklch(60% 0.126 221.723);
        --color-info-content: oklch(100% 0 0);
        --color-success: oklch(62% 0.194 149.214);
        --color-success-content: oklch(100% 0 0);
        --color-warning: oklch(85% 0.199 91.936);
        --color-warning-content: oklch(0% 0 0);
        --color-error: oklch(70% 0.191 22.216);
        --color-error-content: oklch(0% 0 0);
        --radius-selector: 0.25rem;
        --radius-field: 0.25rem;
        --radius-box: 0.25rem;
        --size-selector: 0.25rem;
        --size-field: 0.25rem;
        --border: 1px;
        --depth: 0;
        --noise: 0;
      }
    </style>

it will give
anoth_theme

@dmarcos dmarcos merged commit 74b6a8b into aframevr:master Dec 8, 2025
1 check passed
@vincentfretin vincentfretin deleted the use-css-variables branch December 9, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants