Reputation: 229
There is a plugin in which the text styles are set. Is it possible to set a style for a combination of these styles at different breakpoints?
/** @type {Plugin} */
const plugin = require('tailwindcss/plugin');
module.exports = plugin(function ({ addBase, addVariant, theme }) {
addBase({
'.myText-1': {
fontWeight: '700',
fontSize: '24px',
lineHeight: '28px',
},
'.myText-2': {
fontWeight: '400',
fontSize: '20px',
lineHeight: '24px',
},
'.typo-xx': 'myText-1 md:myText-2 lg:myText-1', //is it possible somehow?
});
});
I have no idea how to do this. I assume it's possible somehow using 'addVariants'. Am I right? Or is there some other way?
Upvotes: 2
Views: 172