Thream / styled-jsx-plugin-sass

Plugin to add Sass support to styled-jsx.
https://npmjs.com/@styled-jsx/plugin-sass
MIT License
24 stars 3 forks source link

Importing sass from external files #105

Open tmyers101 opened 2 years ago

tmyers101 commented 2 years ago

Does this package include support for importing sass from external files and inputting it into style jsx tags, similar to https://github.com/vercel/styled-jsx#styles-outside-of-components?

theoludwig commented 2 years ago

Hey! :wave: @tmyers101

Yes, it should work. It could be great if you can confirm that it actually works. :smile:

tmyers101 commented 2 years ago

I just tried it and sadly can't get it to work. I am using a template literal in an external file and writing SCSS (see attached [code). I am importing it into a NextJS component and using this syntax: <style jsx>{styles}</style> in the jsx. The main issue I can see is that the jsx classes that are being added to the elements are 'jsx-undefined', which is affecting the nesting (see other attached).

Screen Shot 2021-11-21 at 1 10 25 PM

Screen Shot 2021-11-21 at 1 24 31 PM (2)