fix: tailwind warning fixes

This commit is contained in:
sriram veeraghanta 2024-09-10 17:57:06 +05:30
parent 545717cc51
commit 04b10cabc8

View file

@ -18,8 +18,8 @@ module.exports = {
"./pages/**/*.tsx", "./pages/**/*.tsx",
"./app/**/*.tsx", "./app/**/*.tsx",
"./ui/**/*.tsx", "./ui/**/*.tsx",
"../packages/ui/**/*.{js,ts,jsx,tsx}", "../packages/ui/src/**/*.{js,ts,jsx,tsx}",
"../packages/editor/**/src/**/*.{js,ts,jsx,tsx}", "../packages/editor/src/**/*.{js,ts,jsx,tsx}",
"!../packages/ui/**/*.stories{js,ts,jsx,tsx}", "!../packages/ui/**/*.stories{js,ts,jsx,tsx}",
], ],
}, },
@ -334,7 +334,7 @@ module.exports = {
80: "18rem", 80: "18rem",
96: "21.6rem", 96: "21.6rem",
"page-x": "1.35rem", "page-x": "1.35rem",
"page-y": "1.35rem" "page-y": "1.35rem",
}, },
margin: { margin: {
0: "0", 0: "0",
@ -436,23 +436,26 @@ module.exports = {
custom: ["Inter", "sans-serif"], custom: ["Inter", "sans-serif"],
}, },
}, },
plugins: [require("tailwindcss-animate"), require("@tailwindcss/typography"), function({ addUtilities }) { plugins: [
const newUtilities = { require("tailwindcss-animate"),
// Mobile screens require("@tailwindcss/typography"),
'.px-page-x': { function ({ addUtilities }) {
paddingLeft: '1.25rem', const newUtilities = {
paddingRight: '1.25rem', // Mobile screens
}, ".px-page-x": {
// Medium screens (768px and up) paddingLeft: "1.25rem",
'@media (min-width: 768px)': { paddingRight: "1.25rem",
'.px-page-x': {
paddingLeft: '1.35rem',
paddingRight: '1.35rem',
}, },
} // Medium screens (768px and up)
}; "@media (min-width: 768px)": {
".px-page-x": {
paddingLeft: "1.35rem",
paddingRight: "1.35rem",
},
},
};
addUtilities(newUtilities, ['responsive']); addUtilities(newUtilities, ["responsive"]);
}, },
], ],
}; };