Project card

A project card that shifts from a compact stacked style to a richer multi-column layout as container width increases.

.card-wrapper {
  container: card / inline-size;
}
 
.card {
  display: flex;
  flex-direction: column;
}
 
@container card (min-width: 350px) {
  .card {
    flex-direction: row;
  }
 
  .card__thumb img {
    width: 200px;
  }
}

Take a look at the demo below and resize the wrapper.

Container queries

A place to share all my demos on CQs

Progress

60%

2 days left

Full Screen