Created
May 3, 2017 10:54
-
-
Save knowbody/8e51a2a6bd368db3171eb5a8202acba3 to your computer and use it in GitHub Desktop.
CSS Grid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*... 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