-
Notifications
You must be signed in to change notification settings - Fork 624
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
fix(module): stop using tailwind's shorthand arbitrary variable syntax #2366
Conversation
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sandros94 It seems you're missing some classes:
text-[--ui-text-muted]
text-[--ui-text-highlighted]
ring-[--ui-border-accented]
- etc.
Yeah, I though about it as soon as I got into bed π I'm fixing them up right now |
@benjamincanac all fixed up |
I'm wondering if it would be a good idea to define all those as Tailwind CSS utilities. Not exactly like before (https://github.com/nuxt/ui/pull/2298/files#diff-d57c48a7c2fad5e00150be2d599877390d949dd7409fb976099c0cd21a26971a) but something like this: @theme default {
--color-primary: var(--ui-primary);
--color-secondary: var(--ui-secondary);
--color-info: var(--ui-info);
--color-success: var(--ui-success);
--color-warning: var(--ui-warning);
--color-error: var(--ui-error);
--color-text-dimmed: var(--ui-text-dimmed);
--color-text-muted: var(--ui-text-muted);
--color-text-toned: var(--ui-text-toned);
--color-text: var(--ui-text);
--color-text-highlighted: var(--ui-text-highlighted);
--color-bg: var(--ui-bg);
--color-bg-elevated: var(--ui-bg-elevated);
--color-bg-accented: var(--ui-bg-accented);
--color-bg-inverted: var(--ui-bg-inverted);
--color-border: var(--ui-border);
--color-border-accented: var(--ui-border-accented);
--color-border-inverted: var(--ui-border-inverted);
} This would allow users to write We would keep the theme as-is with CSS variables so users choose to define the primary colors in their theme as described here it would be blocking. What do you think? |
(We cannot write this |
Not an easy decision π Personally speaking I do enjoy the idea of being in full control of the tailwind's theme within the end project. Just a thought: if we do add those utilities, does it mean that we do need to always include the related css variables? |
Just an idea that I had: Have multiple The module should be written and maintained with a css var approach ( P.S.: might also be useful to have a dedicated |
This is a good idea! I'll keep thinking about this π |
π Linked issue
Resolves #2365
β Type of change
π Description
source: tailwindlabs/tailwindcss#13395 (comment)
π Checklist