Replies: 3 comments 4 replies
-
Which part is this about, |
Beta Was this translation helpful? Give feedback.
2 replies
-
It should work if your CSS imports are in the right order. Do you have a minimal reproduction? |
Beta Was this translation helpful? Give feedback.
2 replies
-
I think this has to do with the specificity of the classes in your globals.css. I fixed this by reordering the layers (found this in some youtube vid): @layer tw_base, radix_ui, tw_components_utils;
@import "@radix-ui/themes/styles.css" layer(radix_ui);
@layer tw_base {
@tailwind base;
}
@layer tw_components_utils {
@tailwind components;
@tailwind utilities;
} now all the tailwind css classes should have a higher specificity and overwrite the radix classes if applied |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have this very basic select from one of the examples in radixUi documentation.
<Select.Root defaultValue="apple" className="p-5"> <Select.Trigger className="p-5"/> <Select.Content position="popper"> <Select.Item value="apple">Apple</Select.Item> <Select.Item value="orange">Orange</Select.Item> </Select.Content> </Select.Root>
Both of these tailwindCss classes are not working on the Select tag (I want it to have some padding inside the select tag)
But it works when I apply custom inline CSS, Why is that?
<Select.Root defaultValue="apple" > <Select.Trigger style={{padding:"30px"}}/> <Select.Content position="popper"> <Select.Item value="apple">Apple</Select.Item> <Select.Item value="orange">Orange</Select.Item> </Select.Content> </Select.Root>
Beta Was this translation helpful? Give feedback.
All reactions