summaryrefslogtreecommitdiffstats
path: root/tailwind.config.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-03-23 22:22:15 +0100
committerEarl Warren <contact@earl-warren.org>2024-03-26 19:04:28 +0100
commit66feafb3de2313c002c8041c817fb82dae7b95b2 (patch)
treec610360f1a4250c5ca27169f69d4457b4468bea6 /tailwind.config.js
parentReplace all simple inline styles with tailwind (#30032) (diff)
downloadforgejo-66feafb3de2313c002c8041c817fb82dae7b95b2.tar.xz
forgejo-66feafb3de2313c002c8041c817fb82dae7b95b2.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. (cherry picked from commit 75e2e5c736687ae1897cf760a432b572feed56f5) Conflicts: templates/repo/header.tmpl trivial context conflict
Diffstat (limited to 'tailwind.config.js')
-rw-r--r--tailwind.config.js18
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`}`];
+ })),
+ },
},
};