Emotion: [SUPPORT] How to use @mixin and @include of SCSS in styled

Created on 15 Oct 2019  路  2Comments  路  Source: emotion-js/emotion

I have @mix function and I want to call as @include. Currently, I can't use SCSS: @mixin and @include.
Example:
const Wrap= styled.div @mixin draw-circle() {} @include draw-circle()
Please check help me!

invalid

All 2 comments

鈿狅笍 This has been marked to be closed in 7 days.

Emotion is not SCSS-compatible and it doesn't even want to be. This is CSS-in-JS and you can use JS to create helpers, mixins etc

Was this page helpful?
0 / 5 - 0 ratings