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

Combine/group work on .selector encapsutated media queries #11

Open
mistergraphx opened this issue Jul 26, 2016 · 1 comment
Open

Combine/group work on .selector encapsutated media queries #11

mistergraphx opened this issue Jul 26, 2016 · 1 comment

Comments

@mistergraphx
Copy link

Hi and thx for your work,

i just realised that media-queries are combine if they are defined in a selector, and not if they are the first level of css declaration.

example:

.test {
    @include media('>phone','<tablet'){
        color: blue;
    }
    @include media('<desktop'){
        color: green;
    }
}

result:

@media (min-width: 431px) and (max-width: 767px) {
  .test {
    color: blue;
  }
}

@media (max-width: 1023px) {
  .test {
    color: green;
  }
}

if i use it in multiples files like this:

// Layout.scss
@include media('<desktop'){
    *, *:before, *:after {
      box-sizing: border-box;
    }

    body,
    body.large,
    body.etroit{
        min-width: 100%; // Surcharge des spip.css 
    }
   ...
// Navigation.scss
@include media('<desktop'){
    #bando_navigation {
        border-right: 1px solid silver;
        width: 120px;
        min-height: 100%;
        position: fixed;
        top: 0;
        left: 0;
  ...

the grouping is ignore and there is one media-querie by imported files .

does i'm right ?

@ivankravchenko
Copy link
Member

Hey @mistergraphx,
I think I need a you to help me understand use case.

Your code looks like SCSS code. group-css-media-queries works with CSS files (usually output after SCSS processor). It should work fine (group media queries in correct order) with example of a result you've provided.

If it does not work as you expect, please provide an input CSS file, output and expected output.

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