/* shared grid image sizing */
.grid img {
  width: 90%;          /* final instruction: 90% of parent width */
}

/* shared UL wrapper for all grids */
.grid {
  padding: 0;
  list-style: none;
}

/* shared LI styles for all grids */
.grid li {
  display: block;      /* base display */
  width: 25%;          /* 4-up grid */
  text-align: center;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

/* inline-block grid specific tweaks */
.using-inline-block {
  font-size: 0;        /* remove spaces between inline-block items */
}

.using-inline-block li {
  display: inline-block;
}

/* flexbox grid */
.using-flex {
  display: flex;
  flex-wrap: wrap;
}

/* grid layout grid */
.using-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* override li width just for the CSS Grid example */
.using-grid li {
  width: 100%;
}
