tailwind spacing 설정 #17
Closed
Moon-ju-young
started this conversation in
General
Replies: 3 comments
-
|
오 좋습니다 훨씬 간결하네요 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
저도 느꼈던 불편함인데 해결이 가능했군요 ㅎㅎ 좋습니다 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
좋습니다! |
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
Uh oh!
There was an error while loading. Please reload this page.
-
tailwind에서는 기본적으로 spacing이라는 변수? 가 있는데 1 spacing은 1rem = 16px 에 해당합니다.
spacing을 사용하면 훨씬 간결하게 tailwind className을 설정할 수 있습니다. (ex.
h-[16px]>h-1)다만 단위가 px과 맞지 않아 따로 계산해야 한다는 점이 불편해 이전 팀에서는
--spacing: 0.0625rem;(0.0625rem = 1px)을 적용하여 1 spacing당 1px에 매칭되게 만들었고 이렇게 사용할 시에 더 간결하게 tailwind 속성이 작성 가능해집니다. (ex.h-[16px]>h-16)그래서
index.css에--spacing: 0.0625rem;을 추가하고 모두 spacing을 쓰는 방식으로 통일하고자 하는데 어떻게 생각하시나요?Beta Was this translation helpful? Give feedback.
All reactions