Skip to content

Complex CSS media queries incorrectly minified #65

@hal7df

Description

@hal7df

Take the following HTML/CSS (JSFiddle):

<div class="colorchange"></div>
.colorchange {
  width: 200px;
  height: 200px;
  background-color: #ff0000;
}

@media screen and ((max-width: 500px) or (max-height: 500px)) {
  .colorchange {
    background-color: #00ffff;
  }
}

When I run something similar to the above through jekyll-minifier, the media query gets transformed to:

@media screen and ((max-width:500px) or(max-height:500px)){

Note the missing space after the or - turns out that space is necessary for the query to work properly. (JSFiddle - no matter the size of the output pane, the box will always be red.)

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

    Issue actions