Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong order @media #18

Open
shtorman opened this issue Feb 23, 2023 · 1 comment
Open

wrong order @media #18

shtorman opened this issue Feb 23, 2023 · 1 comment

Comments

@shtorman
Copy link

shtorman commented Feb 23, 2023

I use this sass code:

@media (max-width: 640px)  {
  .login {
    &__block {
      max-width: 400px;
    }
    &__title {
      align-self: center;
      margin-right: 0;
      margin-bottom: 25px;
    }
    &__button {
      align-self: center;
      margin-right: 0;
    }
  }
}
@media (max-width: 480px)  {
  .login {
    &__block {
      max-width: 300px;
    }
  }
}

My Webpack config:

      {
        test: /\.(scss|css)$/,
        use: [
          MiniCssExtractPlugin.loader,
          'css-loader',
          'postcss-loader',
          'group-css-media-queries-loader',
          'sass-loader',
        ],
      },

group-css-media-queries-loader groped queries, but order wrong - 480px go before 640px i.e:

@media (max-width: 1281px)
@media (max-width: 960px)
@media (max-width: 480px)
@media (max-width: 640px) 

what i do wrong?
itry last verision 4.3.0 and 3.0.2 in both - order wrong.

@retyui
Copy link
Owner

retyui commented Feb 23, 2023

@shtorman can you show css output without group-css-media-queries-loader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants