Replies: 1 comment 1 reply
-
You can use const Title = styled.h1`
#container & {
color: blueviolet;
}
`; Or You can use // Overrides ❌
const Title = styled.h1`
color: gray;
`;
// Overrides ⭕️
const GlobalStyle = createGlobalStyle`
#container ${Title} {
color: gray;
}
`; Please check this sample code :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We want to render components in an environment that already has id selectors for style rules. For examples:
So to override this we need to either add id to the selector, or to use inline style tags. We'd like to avoid inline style tags. Is there a way to prefix selectors in generated style tags with an id?
Beta Was this translation helpful? Give feedback.
All reactions