Update tailwind.config.js

This commit is contained in:
Rishi Raj Jain
2024-01-26 18:53:58 +05:30
committed by GitHub
parent 9eb4cfecfc
commit af941d5d7e
+4 -9
View File
@@ -8,17 +8,12 @@ let h4 = h5 * font_scale;
let h3 = h4 * font_scale; let h3 = h4 * font_scale;
let h2 = h3 * font_scale; let h2 = h3 * font_scale;
let h1 = h2 * font_scale; let h1 = h2 * font_scale;
let fontPrimary, fontPrimaryType, fontSecondary, fontSecondaryType;
let fontPrimaryType, fontSecondaryType;
if (theme.fonts.font_family.primary) { if (theme.fonts.font_family.primary) {
fontPrimary = theme.fonts.font_family.primary
.replace(/\+/g, " ")
.replace(/:[ital,]*[ital@]*[wght@]*[0-9,;]+/gi, "");
fontPrimaryType = theme.fonts.font_family.primary_type; fontPrimaryType = theme.fonts.font_family.primary_type;
} }
if (theme.fonts.font_family.secondary) { if (theme.fonts.font_family.secondary) {
fontSecondary = theme.fonts.font_family.secondary
.replace(/\+/g, " ")
.replace(/:[ital,]*[ital@]*[wght@]*[0-9,;]+/gi, "");
fontSecondaryType = theme.fonts.font_family.secondary_type; fontSecondaryType = theme.fonts.font_family.secondary_type;
} }
@@ -75,8 +70,8 @@ module.exports = {
h6: h6 + "rem", h6: h6 + "rem",
}, },
fontFamily: { fontFamily: {
primary: [fontPrimary, fontPrimaryType], primary: ["var(--font-primary)", fontPrimaryType],
secondary: [fontSecondary, fontSecondaryType], secondary: ["var(--font-secondary)", fontSecondaryType],
}, },
}, },
}, },