Skip to content
Discussion options

You must be logged in to vote

현재 따로 적용중인 브라우저 폰트 크기는 없고
기본 크기인 16pt 을 따르고 있습니다.

tailwind.config.js 를 보시면
base: '0.875rem'
라는 것을 보실 수 있으실텐데 14/16 을 하면 나오는 값입니다.

따라서 14px 을 base 로한 custom fontSize 를 쓰고 있습니다.
현재 쓰고있는 fontSize 를 보면

fontSize: {
xs: '0.625rem', 10pt
sm: '0.6564375162124634rem', 10.503pt
base: '0.875rem', 14pt
lg: '1.1663750410079956rem', 18.662pt
},

이렇게 볼 수 있습니다.
따라서 현재 적용되고 있는 기본 브라우저 폰트 크기는 16pt 입니다.

정확하게 지인님이 쓰려는 width - 85 height - 30 top - 261 left - 118 를 테일윈드로 적용시키려면
w-[85/16rem] h-[30/16rem] top-[261/16rem] left-[118/16rem] 이런식으로 쓰시면 됩니다.

[ ] (대괄호) 는 꼭 있어야 합니다.
[ ] 안에는 계산된 값이 있어야 합니다. ex) w-[85/16rem] >> w-[5.3125rem]

저같은 경우 tailwind에서 자동완성되는 크기에서 최대한 근접한 크기를 쓰고 정확한 크기를 쓰고싶을 때 위와 같은 방법을 쓰고 있습니다.

Replies: 1 comment 1 reply

Comment options

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

iamjinpark Jan 2, 2024
Maintainer Author

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