CSS 3 · Responsive design
Respond to the container's size
Style a component according to the space it has, not the screen.
.card-wrapper {
container-type: inline-size;
}
@container (min-width: 400px) {
.card { display: flex; }
}
CSS 3 · Responsive design
Style a component according to the space it has, not the screen.
.card-wrapper {
container-type: inline-size;
}
@container (min-width: 400px) {
.card { display: flex; }
}
Was this page helpful?