Better than pure CSS ist, to write LESS or SASS/SCSS.

Here are some mixins …

SCSS:

@mixin transition($property: all, $duration: 500ms, $type: linear) {
  -webkit-transition: $property $duration $type;
  -moz-transition: $property $duration $type;
  -o-transition: $property $duration $type;
  transition: $property $duration $type;
}

LESS:

.transition (@property: all, @duration: 500ms, @type: linear) {
  -webkit-transition: @property @duration @type;
  -moz-transition: @property @duration @type;
  -o-transition: @property @duration @type;
  transition: @property @duration @type;
}

 

Categories: CSS