Styled-jsx: Weird style transformation on multiple selectors + :global() + line break

Created on 16 Feb 2018  路  5Comments  路  Source: vercel/styled-jsx

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;
}
bug

Most helpful comment

@nkzawa just released 2.2.5

All 5 comments

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

cc @thysultan

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.

Thanks, created the issue on stylis: https://github.com/thysultan/stylis.js/issues/97

@thysultan thanks for the fix!

@giuseppeg https://github.com/zeit/styled-jsx/pull/413 can we have a release ? We're having the problem on our homepage.

@nkzawa just released 2.2.5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

giuseppeg picture giuseppeg  路  3Comments

pungggi picture pungggi  路  4Comments

igor-ribeiro picture igor-ribeiro  路  3Comments

straxico picture straxico  路  4Comments

adamyonk picture adamyonk  路  3Comments