feat(tailwind): enhance font stack for 'dm' and apply font to h2 elements

This commit is contained in:
taroj1205 2024-11-11 22:56:06 +13:00
parent 98f82b9b31
commit aae44e209f

View file

@ -48,7 +48,16 @@ module.exports = {
'"Segoe UI Symbol"', '"Segoe UI Symbol"',
'"Noto Color Emoji"', '"Noto Color Emoji"',
], ],
dm: ["DM Sans"], dm: [
"DM Sans",
"ui-sans-serif",
"system-ui",
"sans-serif",
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
'"Noto Color Emoji"',
],
}, },
fontSize: { fontSize: {
"scale-sm": "clamp(1rem, 2vw, 1.5rem)", "scale-sm": "clamp(1rem, 2vw, 1.5rem)",
@ -72,7 +81,7 @@ module.exports = {
addBase({ addBase({
h2: { h2: {
fontSize: `clamp(${theme("fontSize.6xl")}, 10vw, calc(${theme("fontSize.6xl")} + 1rem))`, fontSize: `clamp(${theme("fontSize.6xl")}, 10vw, calc(${theme("fontSize.6xl")} + 1rem))`,
"@apply font-bold text-secondary leading-none": {}, "@apply font-bold text-secondary leading-none font-dm": {},
}, },
h3: { h3: {
fontSize: `clamp(${theme("fontSize.4xl")}, 10vw, calc(${theme("fontSize.4xl")} + 1rem))`, fontSize: `clamp(${theme("fontSize.4xl")}, 10vw, calc(${theme("fontSize.4xl")} + 1rem))`,