Add default line heights converted to em units to tailwind config

This commit is contained in:
mikiher 2024-06-04 18:11:56 +03:00
parent 651601adf6
commit 5f8066e601

View File

@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = { module.exports = {
content: ['components/**/*.vue', 'layouts/**/*.vue', 'pages/**/*.vue', 'templates/**/*.vue', 'plugins/**/*.js', 'nuxt.config.js'], content: ['components/**/*.vue', 'layouts/**/*.vue', 'pages/**/*.vue', 'templates/**/*.vue', 'plugins/**/*.js', 'nuxt.config.js'],
safelist: ['bg-red-600', 'px-1.5', 'min-w-5', 'border-warning'], safelist: ['bg-red-600', 'px-1.5', 'min-w-5', 'border-warning'],
@ -118,6 +119,7 @@ module.exports = {
} }
}, },
spacing: { spacing: {
// based on tailwind default config converted to em units, see client\node_modules\tailwindcss\stubs\config.full.js
px: '1px', px: '1px',
0: '0px', 0: '0px',
0.5: '0.125em', 0.5: '0.125em',
@ -155,19 +157,20 @@ module.exports = {
96: '24em' 96: '24em'
}, },
fontSize: { fontSize: {
xs: '0.75em', // based on tailwind default config converted to em units, see client\node_modules\tailwindcss\stubs\config.full.js
sm: '0.875em', xs: ['0.75em', '1em'],
base: '1em', sm: ['0.875em', '1.25em'],
lg: '1.125em', base: ['1em', '1.5em'],
xl: '1.25em', lg: ['1.125em', '1.75em'],
'2xl': '1.5em', xl: ['1.25em', '1.75em'],
'3xl': '1.875em', '2xl': ['1.5em', '2em'],
'4xl': '2.25em', '3xl': ['1.875em', '2.25em'],
'5xl': '3em', '4xl': ['2.25em', '2.5em'],
'6xl': '3.75em', '5xl': ['3em', '1'],
'7xl': '4.5em', '6xl': ['3.75em', '1'],
'8xl': '6em', '7xl': ['4.5em', '1'],
'9xl': '8em' '8xl': ['6em', '1'],
'9xl': ['8em', '1']
} }
}, },
variants: { variants: {