div.polaroid {
  width: 320px;
  display: inline-block;
  background-color: white;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

  margin-left: 5px;
  margin-right: 5px;
  margin-bottom: 10px;
}

img.polaroid {
  width: auto;
  height: 138px;
  max-height: 138px;

}

div.polaroidcontainer {
  text-align: center;
  padding-left: 30px;
  padding-right: 30px;
  font-size: 12px;
}

p.polaroidcontainer {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis ellipsis;
}

a.polaroid {
  text-decoration: none;
    filter: grayscale(1);
}

a.polaroid:hover {
  text-decoration: none;
  filter: grayscale(0);
  webkit-transition: 0.2s -webkit-filter linear;
-moz-transition: 0.2s -moz-filter linear;
-moz-transition: 0.2s filter linear;
-ms-transition: 0.2s -ms-filter linear;
-o-transition: 0.2s -o-filter linear;
transition: 0.2s filter linear, 0.2s -webkit-filter linear;
}

@media only screen and (hover: none) and (pointer: coarse) {

  div.polaroid {
    width: 12rem;
  }

  img.polaroid {
    width: auto;
    height: 5rem;
    max-height: 5rem;
  }

  div.polaroidcontainer {
    font-size: 0.8rem;
  }

}
