W
W
weredy2016-02-26 14:47:46
css
weredy, 2016-02-26 14:47:46

How to minimize css so that identical blocks are not duplicated?

There is CSS:

@media screen and (max-width: 500px) {
    html {
      font-size: 8px; } }
 @media screen and (max-width: 500px) {
      .main-header .logo {
        display: none; } }

I would like to automatically merge such pieces into one block:
@media screen and (max-width: 500px) {
    html {
      font-size: 8px; }
    .main-header .logo {
        display: none; }}

gulp-cssnano does not do this, maybe there is another task for gulp?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg, 2016-02-26
@weredy

gulp-group-css-media-queries

Z
zooks, 2016-07-25
@zooks

gulp-combine-mq

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question