Skip to content

Instantly share code, notes, and snippets.

@davidsword
Last active February 3, 2018 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidsword/e909b447c550dc07231720880752a82a to your computer and use it in GitHub Desktop.
Save davidsword/e909b447c550dc07231720880752a82a to your computer and use it in GitHub Desktop.
#bookshelf {
width:156px;
margin: 0 auto;
}
.book {
-webkit-filter: grayscale(1);
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
background-size:cover;
background-position:center center;
background-repeat: no-repeat;
width:98px; // original
height:147px; // original
width: <?= (98/147)*172 ?>px; // new
height:172px; // new
box-shadow: 0 0 3px 3px rgba(0,0,0,0.09);
display:block;
}
.reading {
float: left;
margin-right: 5px;
}
.read {
float: left;
width:98px; // original
height:147px; // original
width: <?= (98/147)*54 ?>px; // new
height:54px; // new
opacity: 0.8;
margin: 0 0px 5px 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment