Last active
June 24, 2018 20:46
-
-
Save drenther/d808acd10aeb9f554adfccdd98b95d30 to your computer and use it in GitHub Desktop.
pseudo-selector usage in styled-components
This file contains 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
/* index.js */ | |
/* line 11 - 31 */ | |
. | |
. | |
. | |
`* { | |
border: none; | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} | |
html, | |
body, | |
#root { | |
height: 100%; | |
width: 100%; | |
} | |
a, | |
a:hover, | |
a:active, | |
a:visited { | |
text-decoration: none; | |
color: inherit; | |
}`; | |
. | |
. | |
. |
This file contains 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
/* src/User.js */ | |
. | |
. | |
. | |
/* line 40 - 57 */ | |
export default styled(User)` | |
width: 280px; | |
margin: 10px; | |
padding: 10px; | |
border: solid 2px ${getColor('secondary')}; | |
border-radius: 70px; | |
cursor: pointer; | |
display: flex; | |
align-items: center; | |
justify-content: flex-start; | |
transition: all 0.25s ease-in; | |
position: relative; | |
background: ${getColor('secondary')}; | |
&:hover { | |
transform: scale(1.05); | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment