Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styles are just buggy. #115

Closed
devlzcode opened this issue Oct 12, 2023 · 2 comments
Closed

Styles are just buggy. #115

devlzcode opened this issue Oct 12, 2023 · 2 comments
Labels
ecosystem Incompatibility with something else tailwind An issue related to Tailwind

Comments

@devlzcode
Copy link

devlzcode commented Oct 12, 2023

This is just one instance of the issue with styling I've been experiencing with radix-ui themes. I'd love to continue using this library but at this point I've spent more time trying to debug or get consistency in styling cause of problems when I could be getting my product ready.

next 13.5.4
radix-themes 2.0.0

Styles just don't apply sometimes, especially on buttons (I've seen it happen with inputs too). These buttons should both be the accent color, but they are not:
image

export function LoginModal({ isOpen, onClose }) {
  return (
    <Dialog.Root open={isOpen}>
      <Dialog.Content className="max-w-md">
        <Dialog.Title>Login</Dialog.Title>
        <Dialog.Description className="mb-4">
          Please enter your account name and password.
        </Dialog.Description>
        <form className="space-y-4">
          <label htmlFor="account_name">
            <span className="mb-1">Account Name</span>
            <TextField.Root>
              <TextField.Input id="account_name" />
            </TextField.Root>
          </label>
          <div className="space-x-2">
            <Dialog.Close>
              <Button>Cancel</Button>
            </Dialog.Close>
            <Dialog.Close>
              <Button>Submit</Button>
            </Dialog.Close>
          </div>
        </form>
      </Dialog.Content>
    </Dialog.Root>
  );
}

Here is the same issue but using the code from the dialog documention of radix themes:
Screenshot 2023-10-12 at 4 36 08 PM

@vladmoroz
Copy link
Contributor

Looks like Tailwind base overwrites Radix Themes classes in your case.

See #109 (comment) for the solution.

If you use Tailwind just for its layout utilities, I'd recommend to give Radix Themes layout components a try instead.

@devlzcode
Copy link
Author

Looks like Tailwind base overwrites Radix Themes classes in your case.

See #109 (comment) for the solution.

If you use Tailwind just for its layout utilities, I'd recommend to give Radix Themes layout components a try instead.

That works, thanks.

@vladmoroz vladmoroz added ecosystem Incompatibility with something else tailwind An issue related to Tailwind labels Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecosystem Incompatibility with something else tailwind An issue related to Tailwind
Projects
None yet
Development

No branches or pull requests

2 participants