#next.js #tailwind-css
Вопрос:
Например, у меня есть такой блок макета (я понимаю , что не совсем правильно размещать внутри, и, вероятно, сама конструкция ссылки будет изменена, так как сейчас я обновляю проект с next8 на next10).
Я проверил, что это неприменимо .м-4. Есть также ряд других проблем. Стили «исчезают» только во время производственной сборки, в режиме разработки все работает
// мой компонент
<div className='w-full md:w-1/3 md:min-h-40'>
<Link href={block amp;amp; block.get('link')} prefetch={false}>
<a className='no-underline'>
<div className='m-4 border rounded-lg overflow-hidden'>
<h3 className='p-4 text-white text-2xl uppercase bg-olive text-center font-bold'>
{block amp;amp; block.get('title')}
</h3>
<p className='mt-2 p-2 just-text md:text-base lg:just-text md:min-h-36'>
{block amp;amp; block.get('content')}
</p>
</div>
</a>
</Link>
</div>
мой tailwind.config.js:
module.exports = {
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
darkMode: false,
theme: {
screens: {
'sm': '576px',
'md': '768px',
'lg': '992px',
'xl': '1200px',
'print': {'raw': 'print'},
},
colors: {...},
fontFamily: {...},
fontWeight: {...},
...
margin: {
'auto': 'auto',
'px': '1px',
...,
'4': '1rem',
...
}
},
variants: {
extend: {
// empty here
}
},
plugins: [
// only one plugin here, custom plugin for gradients
]
}
// postcss.config.js:
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
}
};