Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pseudo-selector usage in styled-components
/* 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;
}`;
.
.
.
/* 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
You can’t perform that action at this time.