Skip to content

Support SCSS parser #390

@7studio

Description

@7studio

Hi,

I'm a bit ashamed but I have to admit I have to work with Sass in my new job…

I tried to adjust my PostCSS workflow to this new team constraint with the SCSS parser for PostCSS (syntax option and postcss-scss) but I run into a problem with the postcss-import plugin. The plugin doesn't take into account this context and doesn't allow us to use specific Sass syntaxes like:

@import "foo/bar";

@import "rounded-corners", "text-shadow";

#main {
  @import "example";
}

I read the issues #345, #96, #79 and #130 but IMHO, the plugin should escape these cases without throwing warning (syntax validation) and removing/handling code (@import into declaration block) to let Sass resolves them if we use SCSS or Sass parser.

Another solution could have been to run the filter function before validating the @import syntax to escape these cases by passing a second parameter to check the entire at-rule.

I will enjoy to try a PR if you find this idea interesting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions