Open fmmoret opened 3 months ago
Issue just showed up after upgrading swc. Used to work on very old versions.
@kdy1 Can you give pointers as to where this fix could be made? It is blocking my team from upgrading, but the general vicinity of the parsing fix is difficult for me to locate
https://github.com/swc-project/plugins/blob/75df607ccd322efe138bb6a7f7c57accfafb989c/packages/styled-jsx/transform/src/transform_css_lightningcss.rs#L76-L83 and https://github.com/swc-project/plugins/blob/75df607ccd322efe138bb6a7f7c57accfafb989c/packages/styled-jsx/transform/src/transform_css_swc.rs#L39-L45
Those are for lightningcss mode and swc_css mode respectively
Minimal repro -- color: blue won't be applied. The parser appears to be matching on the
}
in${FontStyle.Headline2}
If I paste in the value of FontStyle.Headline2 directly, it works correctly. OR if I add in extra attributes below like:
Then it also works fine.
FontStyle.Headline2: