Guidelines for modifying theme #311
-
Hey all, I'm setting up RNR in a project for the first time and I've started to update the theme to match our color variables. I wondered if there are any guidelines or best practices for doing this? More specifically, is it important to keep all the existing color variables defined in Should I just be changing the variable values in |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
In case it helps any else, this is the approach I took. In
And in
|
Beta Was this translation helpful? Give feedback.
-
Hey @LanceALaughlin, there are 2 places that need to be updated for modifying colors.
For the |
Beta Was this translation helpful? Give feedback.
Hey @LanceALaughlin, there are 2 places that need to be updated for modifying colors.
~/global.css
file:Here live the css variables used by the tailwind classNames. For example, updating the
background
values with update everywhere that uses*-background
likebg-background
.~/lib/constants.ts
file:Here live the javascript variables used for the Navigation Theme. The css variable name is commented beside each value. To keep both in sync, when changing a variable in the
~/global.css
file, you will need to update the value with the same commented out variable name in the~/lib/constants.ts
file. For example, if you update thedestructive
variable in~/global.css
, then you will nee…