M
M
Metalbrother2014-07-30 13:38:20
css
Metalbrother, 2014-07-30 13:38:20

How to automate prefixing (phpStorm, LESS)?

I use mixins for prefixing. It looks something like this:

.border-radius (@radius) {
    -webkit-border-radius: @radius;
       -moz-border-radius: @radius;
            border-radius: @radius;
}

.example {
    height: 150px;
    width: 50%;
    margin: 0 auto;
    .border-radius(5px);
}


I would like to just write (and get css with added properties with prefixes at the output):
.example {
    height: 150px;
    width: 50%;
    margin: 0 auto;
    border-radius: 5px;
}


Interested in a solution for phpStorm. Do not offer any LESS editors, and even more so JS libraries that place prefixes on the client side.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Ineshin, 2014-07-30
@Metalbrother

If you use Grunt to build less files into one css file. Then a plugin for it is perfect for you: https://github.com/nDmitry/grunt-autoprefixer

P
Pavel Myshkin, 2014-07-30
@Pazys

plugins.jetbrains.com/plugin?pr=&pluginId=7059
I use this plugin. He will cope with your task.
Here is an example of minified CSS:

.example{height:150px;width:50%;margin:0 auto;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question