Skip to content

Instantly share code, notes, and snippets.

@knowbody
Created May 3, 2017 10:54
Show Gist options
  • Select an option

  • Save knowbody/8e51a2a6bd368db3171eb5a8202acba3 to your computer and use it in GitHub Desktop.

Select an option

Save knowbody/8e51a2a6bd368db3171eb5a8202acba3 to your computer and use it in GitHub Desktop.
CSS Grid
/*... render() {*/
<StyledGrid>
<LayerTwo>yolo</LayerTwo>
</StyledGrid>
/* }...*/
const StyledGrid = styled.div`
display: grid;
height: 100%;
grid-template-columns: 2rem repeat(2, auto) 2rem;
grid-template-rows: 4rem 4rem auto;
background-color: #fff;
`;
const LayerTwo = styled.div`
background-color: rgb(199, 120, 140);
grid-column-start: 3;
grid-column-end: span 2;
grid-row-start: 2;
grid-row-end: span 2;
transition: all 3s ease-in-out;
-webkit-transition: all 3s ease-in-out;
&:hover {
grid-column-start: 2;
grid-column-end: span 3;
grid-row-start: 2;
grid-row-end: span 2;
};
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment