/*.grid-gallery[data-columns]::before {
  content: '3 .column.size-1of3';
}*/

/* These are the classes that are going to be applied: */
@media screen and (max-width: 480px){
  .grid-gallery[data-columns]::before {
    content: '1 .column.size-1of1';
  }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
  .grid-gallery[data-columns]::before {
    content: '2 .column.size-1of2';
  }
}
@media screen and (min-width: 769px) {
  .grid-gallery[data-columns]::before {
    content: '4 .column.size-1of4';
  }
}

/* Again, you’re free to use and define the classes: */
.column { float: left; }
.size-1of1 { width: 100%; }
.size-1of2 { width: 50%; }
.size-1of3 { width: 33.333%; }
.size-1of4 { width: 25%; }
.item-galley img {
  width: 100%;
}
.item-galley{
  margin: 10px 5px;
}