diff options
author | silverwind <me@silverwind.io> | 2024-03-23 22:22:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-23 21:22:15 +0000 |
commit | 75e2e5c736687ae1897cf760a432b572feed56f5 (patch) | |
tree | c928e537cf5488c07c4ef08709aa7d4fef379766 /tailwind.config.js | |
parent | 0bef9a2775af0e27a0754207fc87537b96c2792e (diff) | |
download | gitea-75e2e5c736687ae1897cf760a432b572feed56f5.tar.gz gitea-75e2e5c736687ae1897cf760a432b572feed56f5.zip |
Migrate font-size helpers to tailwind (#30029)
Migrate `gt-font-*` to `tw-text-*` All tailwind-original class names are
also available and render like they would with 16px root font size.
We currently have root font size at 14px, but I would like to eventually
migrate us to 16px so that the tailwind docs apply to us unchangend and
because 16px is the recommended root font size for web pages in general.
Also the number 16 is much better dividable than 14 so will result in
more integers.
Diffstat (limited to 'tailwind.config.js')
-rw-r--r-- | tailwind.config.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tailwind.config.js b/tailwind.config.js index 01fc9ee24c..0754ab3631 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -73,5 +73,23 @@ export default { semibold: 'var(--font-weight-semibold)', bold: 'var(--font-weight-bold)', }, + fontSize: { // not using `rem` units because our root is currently 14px + 'xs': '12px', + 'sm': '14px', + 'base': '16px', + 'lg': '18px', + 'xl': '20px', + '2xl': '24px', + '3xl': '30px', + '4xl': '36px', + '5xl': '48px', + '6xl': '60px', + '7xl': '72px', + '8xl': '96px', + '9xl': '128px', + ...Object.fromEntries(Array.from({length: 100}, (_, i) => { + return [`${i}`, `${i === 0 ? '0' : `${i}px`}`]; + })), + }, }, }; |