postcss/postcss-mixins

copnverting @include to css

Markj89 opened this issue · 1 comments

I'm using SCSS with Postcss and Tailwind to convert it to css.
I added the mixins dependency to automate my root colors but I noticed the package doesn't support @include

Here's my code:

@define-mixin themeColor, $name, $color {
    .($name) {
        color: $color;
    }
}

@include theme-color(--blue, --blue);
@include theme-color(--red, --red);
@include theme-color(--yellow, --yellow);
@include theme-color(--salmon, --salmon);
@include theme-color(semi_black, --semi-black);
@include theme-color(--main-color, --main-color);

Once I compile it, it will only render the @include.


@include theme-color(--blue, --blue);
@include theme-color(--red, --red);
@include theme-color(--yellow, --yellow);
@include theme-color(--salmon, --salmon);
@include theme-color(semi_black, --semi-black);
@include theme-color(--main-color, --main-color);
ai commented

You need to replace @include to @mixin.

If you want old syntax, there is alternative plugin in docs.