Как вывести глобальные стили в простор для эмоций? ⇐ CSS

Разбираемся в CSS
Anonymous
Как вывести глобальные стили в простор для эмоций?

Сообщение Anonymous »


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:
I know it's a css issue but I want to solve it with emotion

I've already saw:

Источник: https://stackoverflow.com/questions/605 ... or-emotion

Вернуться в «CSS»