Skip to content
Discussion options

You must be logged in to vote

Place the Radix styles.css in the components layer by layer(components).

@import 'tailwindcss';
@import '@radix-ui/themes/styles.css' layer(components);

Place your own default styles in the base or components layer (depending on priority): use components if you want to override Radix's default styles, or base if you don't.

@import 'tailwindcss';
@import '@radix-ui/themes/styles.css' layer(components);

@layer base {
  * {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    /* override default font-family, but it will be weaker than all Radix UI styles, which is not a problem */
    font-family: "Lato", sans-serif;
  }
}

@layer components {
  * {
    /* it will properly overrid…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rozsazoltan
Comment options

Answer selected by rozsazoltan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant