vercel / styled-jsx

Full CSS support for JSX without compromises
http://npmjs.com/styled-jsx
MIT License
7.65k stars 266 forks source link

CSS not working while migration from babel to swc compliler #835

Open vishalmanjrekar opened 1 year ago

vishalmanjrekar commented 1 year ago

Do you want to request a feature or report a bug?

BUG

What is the current behavior?


export const itemStyle = css`
   {
    .item {
      display: flex;
      flex: 0 48%;
      position: relative;
      justify-content: center;
      align-items: center;
      height: 92px;
      margin-bottom: 12px;
      border-radius: 6px;
      background-color: #a9a9a9;
      background-position: center;
      background-repeat: no-repeat;
      background-size: cover;
    }
}`
``` `
#### If the current behavior is a bug, please provide the steps to reproduce and possibly a minimal demo or testcase in the form of a Next.js app, CodeSandbox URL or similar

#### What is the expected behavior?
CSS style should apply

#### Environment (include versions)

- Version of styled-jsx (or next.js if it's being used):5.12
- Browser:
- OS:

#### Did this work in previous versions?
Working fine with babel compiler
huozhi commented 1 year ago

Can you provide a full reproduction?