/* version: 0.3.7, born: 20-10-2016 9:44 */ var Organic = (function(w){ var o = { helpers: {}, lib: { atoms: {}, molecules: {} } } var require = function(v) { if(v == "./helpers/extend") { return o.helpers.extend; } else if(v == "/helpers/snippets" || v == "../../helpers/snippets") { return o.helpers.snippets; } else if(v == "/lib/atoms/atoms" || v == "../../lib/atoms/atoms" || v == "../atoms/atoms.js") { return o.lib.atoms.atoms; } else if(v == "../../helpers/units") { return o.helpers.units; } else if(v == "../../helpers/args") { return o.helpers.args; } else if(v == "path") { return { basename: function(f) { return f.split("/").pop(); } } } else { var moduleParts = v.split("/"); return (function getModule(currentModule) { var part = moduleParts.shift().replace(".js", ""); if(currentModule[part]) { if(moduleParts.length == 0) { return currentModule[part]; } else { return getModule(currentModule[part]) } } })(o); } } var __dirname = ''; var walkClientSide = function(res, obj, path) { if(typeof res == 'undefined') res = []; if(typeof obj == 'undefined') obj = o.lib; if(typeof path == 'undefined') path = "lib/"; for(var part in obj) { if(typeof obj[part] == 'function') { res.push(path + part + ".js"); } else { walkClientSide(res, obj[part], path + part + "/"); } } return res; };o.helpers.args = function(value) { value = value.toString().replace(/\/ /g, '/').split('/'); return value; } o.helpers.extend = function() { var process = function(destination, source) { for (var key in source) { if (hasOwnProperty.call(source, key)) { destination[key] = source[key]; } } return destination; }; var result = arguments[0]; for(var i=1; i  font-family:;
  src:url();
}", "ffa+": "@font-family {
  font-family: 'FontName';
  src: url('FileName.eot');
  src: url('FileName.eot?#iefix') format('embedded-opentype'),
       url('FileName.woff') format('woff'),
       url('FileName.ttf') format('truetype'),
       url('FileName.svg#FontName') format('svg');
  font-style: normal;
  font-weight: normal;
}", "imp": "@import url()", "mp": "@media print {}", "bg:ie": "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='x.png',sizingMethod='crop')", "op:ie": "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)", "op:ms": "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'", "trf": "transform", "trf:r": "transform:rotate(90deg)", "trf:sc": "transform:scale(x,y)", "trf:scx": "transform:scaleX(x)", "trf:scy": "transform:scaleY(y)", "trf:skx": "transform:skewX(90deg)", "trf:sky": "transform:skewY(90deg)", "trf:t": "transform:translate(x,y)", "trf:tx": "transform:translateX(x)", "trf:ty": "transform:translateY(y)", "trs": "transition", "trsde": "transition-delay", "trsdu": "transition-duration", "trsp": "transition-property", "trstf": "transition-timing-function", "ani": "animation", "ann": "animation-name", "adu": "animation-duration", "atf": "animation-timing-function", "ade": "animation-delay", "aic": "animation-iteration-count", "adi": "animation-direction", "aps": "animation-play-state", "key": "@keyframes {}", "ms": "@media screen and () {}", "in": "inherit", "tra": "transparent", "beh": "behavior:url()", "cha": "@charset''", // Pseudo Class "ac": " :active{}", "ac:a": "&:active{}", "af": " :after{}", "af:a": "&:after{}", "be": " :before{}", "be:a": "&:before{}", "ch": " :checked{}", "ch:a": "&:checked{}", "dsa": " :disabled{}[da]", "dsa:a": "&:disabled{}[da:a]", "en": " :enabled{}", "en:a": "&:enabled{}", "fc": " :first-child{}", "fc:a": "&:first-child{}", "fle": " :first-letter{}", "fle:a": "&:first-letter{}", "fli": " :first-line{}", "fli:a": "&:first-line{}", "foc": " :focus{}", "foc:a": "&:focus{}", "ho": " :hover{}", "ho:a": "&:hover{}", "ln": " :lang(){}", "ln:a": "&:lang(){}", "lc": " :last-child{}", "lc:a": "&:last-child{}", // "li": " :link{}", // "li:a": "&:link{}", "nc": " :nth-child(){}", "nc:a": "&:nth-child(){}", "vit": " :visited{}", "vit:a": "&:visited{}", "tgt": " :target{}", "tgt:a": "&:target{}", "fot": " :first-of-type{}", "fot:a": "&:first-of-type{}", "lot": " :last-of-type{}", "lot:a": "&:last-of-type{}", "not": " :nth-of-type(){}", "not:a": "&:nth-of-type(){}", // Scss & Sass "ext": "@extend", "inc": "@include", "mix": "@mixin", "ieh": "ie-hex-str()" }; } o.helpers.units = function(v, def) { if(!v.toString().match(/[%|in|cm|mm|em|ex|pt|pc|px|deg|ms|s]/)) return v + (def || '%'); else return v; } var extend = require("./helpers/extend"), fs = require('fs'), path = require('path') var walk = function(dir) { return walkClientSide(); var results = []; var list = fs.readdirSync(dir); for(var i=0; i 0) { deg = parseInt(args.pop().replace('deg', '')); } else { deg = 0; } var numOfStops = args.length, stepsPercents = Math.floor(100 / (numOfStops-1)).toFixed(2), gradientValue = [], msGradientType = (deg >= 45 && deg <= 135) || (deg >= 225 && deg <= 315) ? 1 : 0, msStartColor = msGradientType === 0 ? getMSColor(args[args.length-1]) : getMSColor(args[0]), msEndColor = msGradientType === 0 ? getMSColor(args[0]) : getMSColor(args[args.length-1]); for(var i=0; i 0) { gradientValue.push(args[i]); } else { gradientValue.push(args[i] + ' ' + (i*stepsPercents) + '%'); } } gradientValue = deg + 'deg, ' + gradientValue.join(', '); return [ { 'background': '-webkit-linear-gradient(' + gradientValue + ')' }, { '~~1~~background': '-moz-linear-gradient(' + gradientValue + ')' }, { '~~2~~background': '-ms-linear-gradient(' + gradientValue + ')' }, { '~~3~~background': '-o-linear-gradient(' + gradientValue + ')' }, { '~~4~~background': 'linear-gradient(' + gradientValue + ')' }, { 'filter': 'progid:DXImageTransform.Microsoft.gradient(startColorstr=\'' + msStartColor + '\', endColorstr=\'' + msEndColor + '\',GradientType=' + msGradientType + ')' }, { 'MsFilter': 'progid:DXImageTransform.Microsoft.gradient(startColorstr=\'' + msStartColor + '\',endColorstr=\'' + msEndColor + '\',GradientType=' + msGradientType + ')' } ] break; } return {}; } o.lib.molecules.grid = function(value) { var args = require('../../helpers/args')(value); if(args.length == 2) { var res = { cf: 'both' } res[args[1]] = { fl: 'l', '-mw-bxz': 'bb', wid: (100 / parseInt(args[0])).toFixed(2) + '%' } return res; } else { return {}; } } o.lib.molecules.invert = function(value) { return { '-wms-filter': 'invert(' + value + '%)' } } o.lib.molecules.moveto = function(value) { var units = require('../../helpers/units'), args = require('../../helpers/args')(value), x = units(!args[0] || args[0] == '' ? 0 : args[0], 'px'), y = units(!args[1] || args[1] == '' ? 0 : args[1], 'px'), z = units(!args[2] || args[2] == '' ? 0 : args[2], 'px'); if(args.length == 2) { return {"-ws-trf": ">translate(" + x + "," + y + ")"}; } else if(args.length == 3) { return {"-ws-trf": ">translate3d(" + x + "," + y + "," + z + ")"}; } } o.lib.molecules.rotateto = function(value) { var units = require('../../helpers/units'), args = require('../../helpers/args')(value); if(args.length == 1) { return {"-ws-trf": ">rotate(" + units(args[0], 'deg') + ")"}; } } o.lib.molecules.saturate = function(value) { return { '-wms-filter': 'saturate(' + value + 'deg)' } } o.lib.molecules.scaleto = function(value) { var args = require('../../helpers/args')(value), x = !args[0] || args[0] == '' ? 0 : args[0], y = !args[1] || args[1] == '' ? 0 : args[1]; if(args.length == 2) { return {"-ws-trf": ">scale(" + x + "," + y + ")"}; } } o.lib.molecules.sepia = function(value) { return { '-wms-filter': 'sepia(' + value + '%)' } } o.lib.molecules.size = function(value) { var units = require('../../helpers/units'), args = require('../../helpers/args')(value), r = {}; if(args.length == 2) { if(args[0] != '') { r.width = units(args[0]); } if(args[1] != '') { r.height = units(args[1]); } return r; } else { return { width: units(args[0]), height: units(args[0]) } } } o.lib.molecules.transparent = function(value) { var args = require('../../helpers/args')(value), r = {}; value = parseFloat(value); r['-s-filter'] = 'progid:DXImageTransform.Microsoft.Alpha(Opacity=' + (value * 100) + ')'; r['filter'] = 'alpha(opacity=' + (value * 100) + ')'; r['-m-opacity'] = value; r['opacity'] = value; r['KhtmlOpacity'] = value; return r; } o.lib.molecules.trsform = function(value) { return { '-wmso-transform': value } }; return o.index; })(window);