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

Typographyをtailwind.configに追加 #46

Merged
merged 3 commits into from
Jan 18, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,22 @@ const config: Config = {
outfit: ["var(--font-outfit)"],
noto: ["var(--font-noto)"],
},
fontSize: {
"10": ["10px", { fontWeight: 400 }],
"12": ["12px", { fontWeight: 400 }],
"14": ["14px", { fontWeight: 400 }],
"14-bold": ["14px", { fontWeight: 700 }],
Copy link
Contributor

Choose a reason for hiding this comment

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

@komura-c
[Q]
font weightは別でクラス指定してあげれば良いのかなと思ったんですがどう思いますか?
https://tailwindcss.com/docs/font-weight

Copy link
Contributor Author

@komura-c komura-c Jan 15, 2025

Choose a reason for hiding this comment

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

@kp047i
それであれば、font weightはデフォルトでfont-normal, font-boldがあるので要らないですかね?
この組み合わせしか使われてないのであれば、text-xxxでどちらも指定できた方が便利かなと思い追加しました!
kpさん的にはどちらの方が使いやすいでしょうか?

Copy link
Contributor

Choose a reason for hiding this comment

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

@komura-c
個人的にはシンプルにサイズだけで良いかなと思いました!

"16": ["16px", { fontWeight: 400 }],
"16-bold": ["16px", { fontWeight: 700 }],
"18": ["18px", { fontWeight: 400 }],
"18-bold": ["18px", { fontWeight: 700 }],
"20": ["20px", { fontWeight: 400 }],
"20-bold": ["20px", { fontWeight: 700 }],
"22-bold": ["22px", { fontWeight: 700 }],
"24-bold": ["24px", { fontWeight: 700 }],
"28-bold": ["28px", { fontWeight: 700 }],
"32-bold": ["32px", { fontWeight: 700 }],
},
},
},
plugins: [require("tailwindcss-animate")],
Expand Down
Loading