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

feat: migrate to tailwind and shadcn #83

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Conversation

mlvieras
Copy link
Collaborator

Description of the change

This PR introduces a bunch of changes. The main one is migrating from Sass to Tailwind + Shadcn. This also caused other changes in cascade (pun intended). Here is a summary:

  • This project no longer uses Sass for styling. All styles have been migrated to Tailwind.
  • I've removed our design system from the project. It was currently made fully using Sass. We need to circle back on this with the design team and understand what they plan to do with Tourmaline and see if it makes sense to migrate it here.
  • All of our Sass code has been removed. This includes the confusing mixins we had before, which were really hard to understand. We no depend fully on Tailwind for breakpoints and theming.
  • I've removed Storybook. This could be controversial? I think that is we rely on Tailwind and Shadcn for our components then we can simply visit their page for rendering and using the components. If we eventually implement other components we can add it again.

Screenshot/Execution

Home screen

localhost_5173_login

About screen

localhost_5173_login (1)

Login screen

localhost_5173_login (2)

Related PRs

None

src/lib/utils.ts Outdated
@@ -0,0 +1,6 @@
import { clsx, type ClassValue } from "clsx";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added by shadcn but it's already defined in utils.ts

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!! Thanks

}

@theme inline {
--radius-sm: calc(var(--radius) - 4px);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth adding custom value examples here just to ilustrate how Tailwind applies the custom color to its classes? (Like, text-, border-, etc).
Or maybe link to the documentation? Or perhaps in a different PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to do this on a separate PR. And I also think we should discuss what we want this to look like

Copy link
Contributor

@gpicart gpicart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job!
Is it wort also adding Tailwind Prettier extension?
https://tailwindcss.com/blog/automatic-class-sorting-with-prettier

@mlvieras
Copy link
Collaborator Author

Awesome job! Is it wort also adding Tailwind Prettier extension? https://tailwindcss.com/blog/automatic-class-sorting-with-prettier

Done!

@mlvieras mlvieras force-pushed the feat-add-tailwind branch from 0a8dbd0 to 0892e1a Compare March 20, 2025 14:28
@mlvieras mlvieras requested a review from gpicart March 20, 2025 17:55
@@ -10,7 +7,10 @@ export const Container: React.FC<ContainerProps> = ({
className = "",
...props
}) => (
<div className={classnames(className, styles.baseContainer)} {...props}>
<div
className={`mx-auto w-full px-4 sm:w-[40rem] md:w-[48rem] lg:w-[64rem] xl:w-[80rem] 2xl:w-[96rem] ${className}`}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In here we should use the cn function, since tailwind doesn't respect class precedence by the order in the className

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants