==================
* Fixed issue [#940](https://github.com/jakubpawlowicz/clean-css/issues/940) - handling more `font` keywords.
+* Fixed issue [#941](https://github.com/jakubpawlowicz/clean-css/issues/941) - breaking up vendor prefixed `animation`.
[4.1.1 / 2017-05-08](https://github.com/jakubpawlowicz/clean-css/compare/v4.1.0...v4.1.1)
==================
}
function animation(property, compactable, validator) {
- var duration = _wrapDefault('animation-duration', property, compactable);
- var timing = _wrapDefault('animation-timing-function', property, compactable);
- var delay = _wrapDefault('animation-delay', property, compactable);
- var iteration = _wrapDefault('animation-iteration-count', property, compactable);
- var direction = _wrapDefault('animation-direction', property, compactable);
- var fill = _wrapDefault('animation-fill-mode', property, compactable);
- var play = _wrapDefault('animation-play-state', property, compactable);
- var name = _wrapDefault('animation-name', property, compactable);
+ var duration = _wrapDefault(property.name + '-duration', property, compactable);
+ var timing = _wrapDefault(property.name + '-timing-function', property, compactable);
+ var delay = _wrapDefault(property.name + '-delay', property, compactable);
+ var iteration = _wrapDefault(property.name + '-iteration-count', property, compactable);
+ var direction = _wrapDefault(property.name + '-direction', property, compactable);
+ var fill = _wrapDefault(property.name + '-fill-mode', property, compactable);
+ var play = _wrapDefault(property.name + '-play-state', property, compactable);
+ var name = _wrapDefault(property.name + '-name', property, compactable);
var components = [duration, timing, delay, iteration, direction, fill, play, name];
var values = property.value;
var value;
assert.deepEqual(components[7].value, [['property-value', 'slidein'], ['property-value', ','], ['property-value', 'slideout']]);
}
},
+ 'vendor prefixed': {
+ 'topic': function () {
+ return _breakUp([
+ [
+ 'property',
+ ['property-name', '-moz-animation'],
+ ['property-value', '3s'],
+ ['property-value', 'ease-in'],
+ ['property-value', '1s'],
+ ['property-value', '2'],
+ ['property-value', 'reverse'],
+ ['property-value', 'both'],
+ ['property-value', 'paused'],
+ ['property-value', 'slidein']
+ ]
+ ]);
+ },
+ 'has 8 components': function (components) {
+ assert.lengthOf(components, 8);
+ },
+ 'has animation-duration': function (components) {
+ assert.deepEqual(components[0].name, '-moz-animation-duration');
+ assert.deepEqual(components[0].value, [['property-value', '3s']]);
+ },
+ 'has animation-timing-function': function (components) {
+ assert.deepEqual(components[1].name, '-moz-animation-timing-function');
+ assert.deepEqual(components[1].value, [['property-value', 'ease-in']]);
+ },
+ 'has animation-delay': function (components) {
+ assert.deepEqual(components[2].name, '-moz-animation-delay');
+ assert.deepEqual(components[2].value, [['property-value', '1s']]);
+ },
+ 'has animation-iteration-count': function (components) {
+ assert.deepEqual(components[3].name, '-moz-animation-iteration-count');
+ assert.deepEqual(components[3].value, [['property-value', '2']]);
+ },
+ 'has animation-direction': function (components) {
+ assert.deepEqual(components[4].name, '-moz-animation-direction');
+ assert.deepEqual(components[4].value, [['property-value', 'reverse']]);
+ },
+ 'has animation-fill-mode': function (components) {
+ assert.deepEqual(components[5].name, '-moz-animation-fill-mode');
+ assert.deepEqual(components[5].value, [['property-value', 'both']]);
+ },
+ 'has animation-play-state': function (components) {
+ assert.deepEqual(components[6].name, '-moz-animation-play-state');
+ assert.deepEqual(components[6].value, [['property-value', 'paused']]);
+ },
+ 'has animation-name': function (components) {
+ assert.deepEqual(components[7].name, '-moz-animation-name');
+ assert.deepEqual(components[7].value, [['property-value', 'slidein']]);
+ }
+ }
},
'background': {
'inherit': {
]
]);
}
+ },
+ 'vendor prefixed animation shorthand and longhand': {
+ 'topic': function () {
+ return _optimize('.block{-webkit-animation:1s infinite slidein;-webkit-animation-timing-function:ease-in}');
+ },
+ 'into': function (properties) {
+ assert.deepEqual(properties, [
+ [
+ 'property',
+ ['property-name', '-webkit-animation', [[1, 7, undefined]]],
+ ['property-value', '1s', [[1, 25, undefined]]],
+ ['property-value', 'ease-in', [[1, 79, undefined]]],
+ ['property-value', 'infinite', [[1, 28, undefined]]],
+ ['property-value', 'slidein', [[1, 37, undefined]]]
+ ]
+ ]);
+ }
}
})
.addBatch({