UNPKG

1.95 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var formatting_1 = require("./utils/formatting");
4/**
5 * The CSS transform property lets you modify the coordinate space of the CSS visual formatting model. Using it, elements can be translated, rotated, scaled, and skewed.
6 * Returns the transforms as a delimited string by space or returns 'none' if no arguments are provided
7 * @see https://developer.mozilla.org/en-US/docs/Web/CSS/transform
8 */
9function transform() {
10 var transforms = [];
11 for (var _i = 0; _i < arguments.length; _i++) {
12 transforms[_i] = arguments[_i];
13 }
14 return transforms.length ? transforms.join(' ') : 'none';
15}
16exports.transform = transform;
17exports.matrix = formatting_1.createFunction('matrix');
18exports.matrix3d = formatting_1.createFunction('matrix3d');
19exports.perspective = formatting_1.createFunction('perspective');
20exports.rotate = formatting_1.createFunction('rotate');
21exports.rotate3d = formatting_1.createFunction('rotate3d');
22exports.rotateX = formatting_1.createFunction('rotateX');
23exports.rotateY = formatting_1.createFunction('rotateY');
24exports.rotateZ = formatting_1.createFunction('rotateZ');
25exports.scale = formatting_1.createFunction('scale');
26exports.scale3d = formatting_1.createFunction('scale3d');
27exports.scaleX = formatting_1.createFunction('scaleX');
28exports.scaleY = formatting_1.createFunction('scaleY');
29exports.scaleZ = formatting_1.createFunction('scaleZ');
30exports.skew = formatting_1.createFunction('skew');
31exports.skewX = formatting_1.createFunction('skewX');
32exports.skewY = formatting_1.createFunction('skewY');
33exports.translate = formatting_1.createFunction('translate');
34exports.translate3d = formatting_1.createFunction('translate3d');
35exports.translateX = formatting_1.createFunction('translateX');
36exports.translateY = formatting_1.createFunction('translateY');
37exports.translateZ = formatting_1.createFunction('translateZ');