/* KUTE.js - The Light Tweening Engine * package CSS Plugin * by dnp_theme * Licensed under MIT-License */ (function(factory){ if (typeof define === 'function' && define.amd) { define(["./kute.js"], function(KUTE){ factory(KUTE); return KUTE; }); } else if(typeof module == "object" && typeof require == "function") { var KUTE = require("./kute.js"); // Export the modified one. Not really required, but convenient. module.exports = factory(KUTE); } else if(typeof window.KUTE != "undefined") { factory(KUTE); } else { throw new Error("CSS Plugin require KUTE.js.") } })(function(KUTE){ var K = window.KUTE, p, DOM = K.dom, PP = K.pp, _br = K.property('borderRadius'), _brtl = K.property('borderTopLeftRadius'), _brtr = K.property('borderTopRightRadius'), // all radius props prefixed _brbl = K.property('borderBottomLeftRadius'), _brbr = K.property('borderBottomRightRadius'), _cls = ['borderColor', 'borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor', 'outlineColor'], // colors 'hex', 'rgb', 'rgba' -- #fff / rgb(0,0,0) / rgba(0,0,0,0) _rd = ['borderRadius', 'borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomLeftRadius', 'borderBottomRightRadius'], // border radius px/any _bm = ['right', 'bottom', 'minWidth', 'minHeight', 'maxWidth', 'maxHeight', 'padding', 'margin', 'paddingTop','paddingBottom', 'paddingLeft', 'paddingRight', 'marginTop','marginBottom', 'marginLeft', 'marginRight', 'borderWidth', 'borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth', 'outlineWidth'], // dimensions / box model _tp = ['fontSize','lineHeight','letterSpacing','wordSpacing'], // text properties _clp = ['clip'], _bg = ['backgroundPosition'], // clip | background position _mg = _rd.concat(_bm,_tp), // a merge of all properties with px|%|em|rem|etc unit _all = _cls.concat(_clp, _rd, _bm, _tp, _bg), al = _all.length, number = K.Interpolate.number, unit = K.Interpolate.unit, color = K.Interpolate.color, _d = _d || {}; //all properties default values //populate default values object for ( var i=0; i< al; i++ ){ p = _all[i]; if (_cls.indexOf(p) !== -1){ _d[p] = 'rgba(0,0,0,0)'; // _d[p] = {r:0,g:0,b:0,a:1}; } else if ( _mg.indexOf(p) !== -1 ) { _d[p] = 0; } else if ( _bg.indexOf(p) !== -1 ){ _d[p] = [50,50]; } else if ( p === 'clip' ){ _d[p] = [0,0,0,0]; } } // create prepare/process/render functions for additional colors properties for (var i = 0, l = _cls.length; i