Tailwind CSS color config defaults for Border, Ring, and Ring Offset #4564
jeremy-code
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In Tailwind CSS, the default border color is set to
theme('colors.gray.200', 'currentColor')
and the default ring color is set totheme('colors.blue.500', '#3b82f6')
. Per the docs, Border Color, Ring Color, and Ring Offset Color can be modified in the Tailwind CSS config file.Currently, shadcn/ui creates new colors in the config for
border
andring
.border-border
is manually applied inglobals.css
to*
. Also, everytime ring is used, it must be accompanied by classring-ring
;ring-offset
requiresring-offset-background
.However, by setting these as the defaults, it will overwrite the Tailwind CSS defaults with the correct variables and prevent the above code repetition.
Here's an example of what it may look lake in the tailwind.config.js.
What do you think? Note that ring offset color does not typically have a
DEFAULT
which may have some unexpected behavior.Beta Was this translation helpful? Give feedback.
All reactions