-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
src/lib/utils.ts
Outdated
@@ -0,0 +1,6 @@ | |||
import { clsx, type ClassValue } from "clsx"; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this 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
Done! |
0a8dbd0
to
0892e1a
Compare
src/common/container/container.tsx
Outdated
@@ -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}`} |
There was a problem hiding this comment.
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
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:
Screenshot/Execution
Home screen
About screen
Login screen
Related PRs
None