Как использовать новый контейнер в Tailwind V4?CSS

Разбираемся в CSS
Anonymous
Как использовать новый контейнер в Tailwind V4?

Сообщение Anonymous »

По сути, я хочу поставить @container class в свой Div. Я хотел сделать это в центре и с точками останова, как это было в Tailwind v3, например, :
container: {
center: true,
padding: {
DEFAULT: '1rem',
sm: '2rem',
},
screens: {
'2xl': '1400px'
}
},
< /code>
Но теперь это изменилось, я пробую это < /p>

@theme {
--breakpoint-default: initial;
--breakpoint-tablet: 40rem;
--breakpoint-laptop: 64rem;
--breakpoint-desktop: 80rem;
}
< /code>

const Header = () => {
return (


Sensei

Contact



);
};
< /code>
however, this doesn't work as it had been working and I don't know what to do.
I've read new docs but they are not clear for me
I was expecting it to behave as a container(put center, paddings, etc.) but it doesn't work
Изображение

here is the header, but it should be with paddings

Подробнее здесь: https://stackoverflow.com/questions/796 ... ailwind-v4

Вернуться в «CSS»