Skip to content

Commit

Permalink
Change CSS Applying Order to Multiple Classes
Browse files Browse the repository at this point in the history
  • Loading branch information
hail2u committed Jan 28, 2017
1 parent 043c7ce commit e6ac77d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Expand Up @@ -284,9 +284,10 @@ I suggest defining a query order on top of your CSS:
If you use only simple `min-width` queries, [the `sort` option][4] can help.


### CSS Applying Order
### Multiple Classes

CSS MQPacker changes order of rulesets. This may break CSS applying order.
CSS MQPacker works only with CSS. This may break CSS applying order to an
elements that have multiple classes.

```css
@media (min-width: 320px) {
Expand Down Expand Up @@ -327,9 +328,10 @@ Becomes:
}
```

This looks good, but if an HTML element has `class="bar baz"` and viewport width
larger than `640px`, that element `width` incorrectly set to `200px` instead of
`300px`. This problem cannot be resolved only with CSS. So, be careful!
The result looks good. However, if an HTML element has `class="bar baz"` and
viewport width larger than `640px`, that element `width` incorrectly set to
`200px` instead of `300px`. This problem cannot be resolved only with CSS, so be
careful!


LICENSE
Expand Down

0 comments on commit e6ac77d

Please sign in to comment.