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

Weird style transformation on multiple selectors + :global() + line break #411

Closed
nkzawa opened this issue Feb 16, 2018 · 5 comments
Closed
Labels

Comments

@nkzawa
Copy link
Contributor

nkzawa commented Feb 16, 2018

When transpiled the following css:

.foo :global(path),
.bar
   :global(path) {
   stroke: #067df7;
 }

Generated css is:

.jsx-123{.foo :global(path),.bar;}path{stroke:#067df7;}

It's no problem when css is like:

// no line break
.foo :global(path),
.bar :global(path) {
  stroke: #067df7;
}
@giuseppeg
Copy link
Collaborator

@nkzawa looks like a bug in Stylis. I am able to reproduce on https://stylis.js.org

cc @thysultan

@giuseppeg giuseppeg added the bug label Feb 16, 2018
@thysultan
Copy link
Contributor

Works with the following config(required semicolons): stylis.set({semicolon: true, cascade: false}). I'll see if i can improve the no-semicolon option to also handle this. Can you open a corresponding issue on the stylis repo.

@nkzawa
Copy link
Contributor Author

nkzawa commented Feb 17, 2018

Thanks, created the issue on stylis: thysultan/stylis#97

@nkzawa nkzawa mentioned this issue Feb 17, 2018
@nkzawa
Copy link
Contributor Author

nkzawa commented Feb 17, 2018

@thysultan thanks for the fix!

@giuseppeg #413 can we have a release ? We're having the problem on our homepage.

@giuseppeg
Copy link
Collaborator

@nkzawa just released 2.2.5

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

No branches or pull requests

3 participants