A
A
Alexander2014-11-13 00:51:15
phpstorm
Alexander, 2014-11-13 00:51:15

Is there for PhpStorm, something like an Autoprefixer plugin (for css)?

The meaning is simple, we write:

a {
    transition: transform 1s
}

The plugin itself adds:
a {
  -webkit-transition: -webkit-transform 1s;
  -o-transition: -o-transform 1s;
  transition: -ms-transform 1s;
  transition: transform 1s
}

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Sitnik, 2015-09-16
@Iskin

As the author of the Autoprefixer, I can directly say that it cannot be used in text editors. It should work in Gulp, webpack or some other build system.
There are many reasons for this. For example, that code with prefixes is hard to read. Or the fact that later, when editing, you forget to fix all the properties. Or that your styles won't automatically get rid of unnecessary prefixes.
In general, learn Gulp - this way you will spend a few evenings, but then you will quickly catch up with more automation.

A
Andrey Aleksandrovich, 2017-06-01
@KaSeo

Use a preprocessor for CSS (LESS || SCSS || SASS). You can use mixins in them. In addition, preprocessors greatly simplify life and increase performance)
I'm used to working with LESS and in each project there is an elements.less file with a set of mixins :

.box-shadow(@arguments) {
  -webkit-box-shadow: @arguments;
  -moz-box-shadow: @arguments;
  box-shadow: @arguments;
}
.rotation(@deg:5deg){
  .transform(rotate(@deg));
}

In the code, I just use it later, for example: or
.box-shadow(0 0 10px fade(#000, 5%));

S
Sergey, 2014-11-13
Protko @Fesor

PhpStorm has watchers if you like. But in general, it would be better to use some kind of gulp - in addition to autoprefixer, we would also get less/sass/etc without which it is difficult to live now (and why?), sourcemaps and optimizers, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question