My example:
This fragment of code is working correctly:
const centered = css`
${Column} {
&:first-child ${StyledLink} {
margin: 0 0 0 auto;
}
&:last-child ${StyledLink} {
margin: 0 auto 0 0;
}
}
`
const Example = styled('div')`
${breakpoint('md')`
${props => props.centered && centered};
`}
`
But I have an error on this, which is a much better solution for my project:
const centered = css`
${breakpoint('md')`
${Column} {
&:first-child ${StyledLink} {
margin: 0 0 0 auto;
}
&:last-child ${StyledLink} {
margin: 0 auto 0 0;
}
}
`}
`
const Example = styled('div')`
${props => props.centered && centered};
`
The result of the second one is that no margin will be assigned which is completely wrong
My example:
This fragment of code is working correctly:
But I have an error on this, which is a much better solution for my project:
The result of the second one is that no margin will be assigned which is completely wrong