/* Solving this with dynamic a data attribute (i.e. attr(data-rotation)) does not work, as that's a string. */ #photos-index, #photos-album { .rotate90 { img { transform: rotate(90deg); } } .rotate180 { img { transform: rotate(180deg); } } .rotate270 { img { transform: rotate(270deg); } } .grayscale { img { filter: grayscale(1); } } .grid-item.grayscale { .overlay { background-color: rgba(88, 88, 88, 0.6); } } }