Skip to content

Instantly share code, notes, and snippets.

@kyrose
Created February 5, 2021 21:08
Show Gist options
  • Save kyrose/bcbdee3133b3d20432996ed18c4e3c95 to your computer and use it in GitHub Desktop.
Save kyrose/bcbdee3133b3d20432996ed18c4e3c95 to your computer and use it in GitHub Desktop.
.grid {
width: 100%;
display: grid;
grid-template-columns: 1fr;
gap: .5rem;
padding: .5rem;
@media #{$mq-md} {
grid-template-columns: repeat(2, 1fr);
}
@media #{$mq-lg} {
grid-template-columns: repeat(5, 1fr);
gap: 1rem;
}
}
.grid-item {
width: 100%;
height: 300px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border: $border;
border-radius: 1rem;
padding: 2rem;
text-decoration: none;
.description {
display: none;
margin-top: 2rem;
}
@media #{$mq-md} {
justify-content: flex-start;
align-items: flex-start;
.description {
display: block;
}
}
&:hover {
background: $link-block-background-hover;
color: $link-block-text-hover;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment