Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create global style #85

Open
Danilqa opened this issue Aug 29, 2019 · 2 comments
Open

Create global style #85

Danilqa opened this issue Aug 29, 2019 · 2 comments

Comments

@Danilqa
Copy link

Danilqa commented Aug 29, 2019

Thanks for the great library!

I haven't found a solution for creating global theming in the application based on theme properties: for instance, the name of font families. (Something like this: https://www.styled-components.com/docs/api#createglobalstyle)

Does a solution with generating own globals.css from interpolated string by webpack plugin is ok? Or reshadow has something inside for resolving this problem?

@lttb
Copy link
Member

lttb commented Aug 30, 2019

Hi @Danilqa! Thank you for the issue!

Yeah, you can use, in example, .global.css extension and exclude reshadow plugins for this kind of files.

By the way, reshadow has the :global pseudo-class for elements and attributes, like css-modules for class names:

:global(body),
:global(html) {
  /* styles */
}

:global([data-id]) {
  /* styles */
}

@Danilqa
Copy link
Author

Danilqa commented Aug 30, 2019

@lttb, thanks! Your option with :global looks and works great. We will use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants