Skip to content

Instantly share code, notes, and snippets.

@mhekel
Created April 5, 2026 12:48
Show Gist options
  • Select an option

  • Save mhekel/682ce67001be8cedb2ca4635a3f6dcde to your computer and use it in GitHub Desktop.

Select an option

Save mhekel/682ce67001be8cedb2ca4635a3f6dcde to your computer and use it in GitHub Desktop.
.case {
border: 2rem solid #ccc;
}
.shelf {
position: relative;
display: flex;
align-items: flex-end;
height: 15rem;
background: linear-gradient(to top, #666, #777 5%);
padding: 0;
&:before {
position: absolute;
top: 0;
content: "";
display: block;
width: 100%;
height: 50%;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
z-index: 100;
}
&:after {
position: absolute;
content: "";
bottom: -2rem;
height: 2rem;
width: 100%;
background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
}
& + .shelf {
margin-top: 2rem;
}
}
.book {
position: relative;
display: flex;
flex-direction: column;
justify-content: space-around;
width: 2rem;
align-items: center;
border-radius: 5px;
&:before {
opacity: 0.9;
box-sizing: border-box;
display: flex;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment