What is the purpose of style
and tailwind.baseColor
?
#4962
cereallarceny
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
style
In my
components.json
file I have a propertystyle
, which I have currently defined as "default". I understand that the docs define these as slightly different spacings and sizings of components... okay, but then why can't I create my own "style"? Moreover, why such arbitrary styles as "default" and "new york"? It's not remotely clear what these mean aside from flipping between them on the website and seeing the difference.Philosophical take: Since the whole point of using ShadCN is that I can customize components to my desire once they're generated by the CLI, why even have "styles" to begin with? Why not just define these spacing differences as CSS variables and have the CLI base them off of that?
tailwind.baseColor
In my
components.json
file I have a propertytailwind.baseColor
, which I have currently defined as "slate" (what I interpret to be a slightly cooler tone of my primary and some black value). Anyhow, it's not immediately obvious from the documentation what this value actually does, but since I'm told I cannot change it after setup, I'm concerned to set it to the wrong value. Since all of my components colors are ultimately controlled from my main stylesheet anyhow - what purpose does this serve? Furthermore - why can't I have aprimary
as abaseColor
? This too, seems quite arbitrary and isn't explained well in the documentation.My guess: This defines the base set of CSS variables used in the main stylesheet, but it doesn't override this file after the first component is generated. It doesn't override since I can change these files and I don't want my modified colors to be overridden every time the CLI adds a new component. Is this correct?
Beta Was this translation helpful? Give feedback.
All reactions