Y
Y
You can just Eugene2018-06-13 11:50:39
gulp.js
You can just Eugene, 2018-06-13 11:50:39

Is there such a gulp plugin for icons?

Dear connoisseurs,
We need a plugin that made png-sprite from svg icons, while preserving different colors that you set through the parameter and mb and icon size. And if such an icon already exists, it simply adds background-poisiton to the icon's match.
For example:

.icon-1 { 
    background-image:  svg('images/svg/icon-1.svg', color=#fff, size=12x12); 
}
.icon-1:hover { 
    background-image: svg('images/svg/icon-1.svg', color=#ccc, size=12x12);
 }

----------------------------------------------------------------------------

.icon-1 { 
    background-image: url('images/svg/sprite.png');
    background-position: 0 0;
}

.icon-1:hover {
    background-image: url('images/svg/sprite.png');
    background-position: 12px 0;
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question