Skip to content

at-rules now also matches @import/@use #167

@simPod

Description

@simPod

I'd like to distinguish between @use+@import directives and the rest of at-rules.

In v5, I had a rule to keep at-rules at the bottom.

So the order was like

.main {
    display: grid;
    ...
    @include media-breakpoint-down(lg) {
        grid-template-areas: "header" "content";
        grid-template-columns: 100%;
    }
}

however, since v6 it also takes all @import statements and put's them at the end of file which does not play well. The @import usually imports something that's used afterwards so it cannot be at the end of the file.

Activity

hudochenkov

hudochenkov commented on Jan 6, 2023

@hudochenkov
Owner

Looks like a regression. I'll take a look in coming days.

hudochenkov

hudochenkov commented on Jan 6, 2023

@hudochenkov
Owner

@simPod I just released 6.0.1. Could you check if it fixed for you?

simPod

simPod commented on Jan 6, 2023

@simPod
Author

Yup, seems like there are no more issues now. Thanks!

hudochenkov

hudochenkov commented on Jan 6, 2023

@hudochenkov
Owner

Thank you for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @simPod@hudochenkov

        Issue actions

          at-rules now also matches @import/@use · Issue #167 · hudochenkov/stylelint-order