Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--color-primary-N vs tailwind colors via variables #3025

Open
amery opened this issue Jan 6, 2025 · 0 comments
Open

--color-primary-N vs tailwind colors via variables #3025

amery opened this issue Jan 6, 2025 · 0 comments
Labels
question Further information is requested

Comments

@amery
Copy link

amery commented Jan 6, 2025

Description

nuxt ui incorrectly assumes tailwind colours are literal values and passes through <alpha-value> when generating its --color-primary-N variables.
it also forces particular shades (400 and 500) as DEFAULT, how can I disable this feature?

        <style id="nuxt-ui-colors">
            :root {
                --color-primary-50: rgb(var(--md-primary-50) / <alpha-value>);
                --color-primary-100: rgb(var(--md-primary-100) / <alpha-value>);
                --color-primary-200: rgb(var(--md-primary-200) / <alpha-value>);
                --color-primary-300: rgb(var(--md-primary-300) / <alpha-value>);
                --color-primary-400: rgb(var(--md-primary-400) / <alpha-value>);
                --color-primary-500: rgb(var(--md-primary-500) / <alpha-value>);
                --color-primary-600: rgb(var(--md-primary-600) / <alpha-value>);
                --color-primary-700: rgb(var(--md-primary-700) / <alpha-value>);
                --color-primary-800: rgb(var(--md-primary-800) / <alpha-value>);
                --color-primary-900: rgb(var(--md-primary-900) / <alpha-value>);
                --color-primary-950: rgb(var(--md-primary-950) / <alpha-value>);
                --color-primary-DEFAULT: rgb(var(--md-primary) / <alpha-value>);
                --color-primary-DEFAULT: var(--color-primary-500);
                --color-gray-50: rgb(var(--md-neutral-50) / <alpha-value>);
                --color-gray-100: rgb(var(--md-neutral-100) / <alpha-value>);
                --color-gray-200: rgb(var(--md-neutral-200) / <alpha-value>);
                --color-gray-300: rgb(var(--md-neutral-300) / <alpha-value>);
                --color-gray-400: rgb(var(--md-neutral-400) / <alpha-value>);
                --color-gray-500: rgb(var(--md-neutral-500) / <alpha-value>);
                --color-gray-600: rgb(var(--md-neutral-600) / <alpha-value>);
                --color-gray-700: rgb(var(--md-neutral-700) / <alpha-value>);
                --color-gray-800: rgb(var(--md-neutral-800) / <alpha-value>);
                --color-gray-900: rgb(var(--md-neutral-900) / <alpha-value>);
                --color-gray-950: rgb(var(--md-neutral-950) / <alpha-value>);
                --color-gray-DEFAULT: rgb(var(--md-neutral) / <alpha-value>);
            }

            .dark {
                --color-primary-DEFAULT: var(--color-primary-400);
            }
        </style>
        <style id="nuxt-ui-variables">
            :root {
                --header-height: 4rem;
                --ui-background: var(--md-surface);
                --ui-foreground: var(--md-on-surface);
            }

            .dark {
                --ui-background: var(--md-surface);
                --ui-foreground: var(--md-on-surface);
            }
        </style>
@amery amery added the question Further information is requested label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant