I'm currently need to integrate common components of a library into multiples websites. The component Library currently have a Global styles. That they inject in the following way:
I want there "Global styles" only available for the components of this library. They are only on a part of the page.
So I've try this:
const Styles = styled.div` div { padding: 0; } `; const Page = () => ( ); But it seems that everything in Styles has the priority. Then if the component has padding: 10px; it will take padding: 0; of Styles
I'm currently need to integrate common components of a library into multiples websites. The component Library currently have a Global styles. That they inject in the following way:
I want there "Global styles" only available for the components of this library. They are only on a part of the page.
So I've try this:
const Styles = styled.div` div { padding: 0; } `; const Page = () => ( ); But it seems that everything in Styles has the priority. Then if the component has padding: 10px; it will take padding: 0; of Styles
Here is the issue reproduced: [list] [*]https://codesandbox.io/s/infallible-glitter-g3gbd [/list] I know it's a css issue but I want to solve it with emotion