Skip to content
This repository was archived by the owner on Dec 28, 2021. It is now read-only.
This repository was archived by the owner on Dec 28, 2021. It is now read-only.

postcss-mixins compatibility problem after update #95

Closed
@mdmoreau

Description

@mdmoreau

Thanks for the recent updates! After getting a project switched over to the latest builds, I'm seeing a new problem while using mixins. It looks like any rules declared in a block after a mixin is called don't get processed. Here's a quick example - can create a demo repo if necessary.

/* input */
@define-mixin test {
  color: blue;
}

body {
  @mixin test;

  background: red;
  font-size: 1rem;

  @media (min-width: 64em) {
    background: green;
  }

  margin: 0;
}

/* output */
body {
  color: blue;
}

@media (min-width: 64em) {
  body {
      background: green;
  }
}

The media block comes through fine, and if I move the mixin call down under a rule, then those above it will be in the build as well. I don't think this is a postcss-mixins plugin problem, as that has always worked correctly with postcss-nested.

Let me know if there's any other info I can provide or if a demo repo would help. Thanks!

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