cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.08k stars 399 forks source link

Support @layer property #1634

Open pearcake opened 2 years ago

pearcake commented 2 years ago

Hello, I'm trying to make new @layer property work with JSS (wrap all my JSS inside @layer test { /*all my jss here */ }), but the only way I was able to do it is hack methods that output JSS to string and hardcode it there. Any suggestions on how to do it properly?

JuhG commented 2 years ago

I would be curious as well. Is there any escape hatch to go around this? Like an option to add a raw string before / after a CSS block without validation. Thanks!

kof commented 2 years ago

Check out how any other rule is implemented in the core, it's all plugins, you can write yours