styled-jsx-plugin-sass icon indicating copy to clipboard operation
styled-jsx-plugin-sass copied to clipboard

Importing sass from external files

Open tmyers101 opened this issue 3 years ago • 2 comments

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?

tmyers101 avatar Nov 20 '21 22:11 tmyers101

Hey! :wave: @tmyers101

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

theoludwig avatar Nov 21 '21 07:11 theoludwig

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)

tmyers101 avatar Nov 21 '21 21:11 tmyers101