UNPKG

cssobj-plugin-flexbox

Version:

cssobj plugin for generate right flexbox CSS, auto vendor prefixer for flexbox in browser, input one line, give you right flexbox!

2 lines 2.61 kB
var cssobj_plugin_flexbox=function(){"use strict";function e(e){return"flex"==e?["-webkit-box","-webkit-flex","-moz-box","-ms-flexbox","flex"]:"inline-flex"==e?["-webkit-inline-box","-webkit-inline-flex","-moz-inline-box","-ms-inline-flexbox","inline-flex"]:e}function n(e){var n=function(e){var n=e.split("-"),t="row"==n[0]?"horizontal":"vertical",i="reverse"==n[1]?"reverse":"normal";return{"-webkit-box-orient":t,"-moz-box-orient":t,"-webkit-box-direction":i,"-moz-box-direction":i,flexDirection:e}};return n(e+"")}function t(e){var n={"flex-start":{"-ms-flex-pack":"start","-webkit-box-pack":"start","-moz-box-pack":"start",justifyContent:"flex-start"},"flex-end":{"-ms-flex-pack":"end","-webkit-box-pack":"end","-moz-box-pack":"end",justifyContent:"flex-end"},center:{"-ms-flex-pack":"center","-webkit-box-pack":"center","-moz-box-pack":"center",justifyContent:"center"},"space-between":{"-ms-flex-pack":"justify","-webkit-box-pack":"justify","-moz-box-pack":"justify",justifyContent:"space-between"},"space-around":{"-ms-flex-pack":"distribute",justifyContent:"space-around"}};return n[e]||{"-ms-flex-pack":e,"-webkit-box-pack":e,"-moz-box-pack":e,justifyContent:e}}function i(e){var n={"flex-start":{"-ms-flex-align":"start","-webkit-box-align":"start","-moz-box-align":"start",alignItems:"flex-start"},"flex-end":{"-ms-flex-align":"end","-webkit-box-align":"end","-moz-box-align":"end",alignItems:"flex-end"}};return n[e]||{"-ms-flex-align":e,"-webkit-box-align":e,"-moz-box-align":e,alignItems:e}}function l(e){var n=isNaN(e)?e:e+1;return{"-ms-flex-order":e,"-webkit-box-ordinal-group":n,"-moz-box-ordinal-group":n,order:e}}function o(e){return{"-ms-flex-positive":e,"-webkit-box-flex":e,"-moz-box-flex":e,flexGrow:e}}function r(e){return{"-ms-flex-negative":e,flexShrink:e}}function f(e){return{"-ms-flex-preferred-size":e,flexBasis:e}}function x(e){var n=(e+"").split(" ").shift(),t="auto"==n?1:"none"==n?0:n;return{"-webkit-box-flex":t,"-moz-box-flex":t,"-ms-flex":e,flex:e}}function a(e){var n={"flex-start":{"-ms-flex-item-align":"start",alignSelf:"flex-start"},"flex-end":{"-ms-flex-item-align":"end",alignSelf:"flex-end"},baseline:{"-ms-flex-item-align":"baseline",alignSelf:"baseline"}};return n[e]||{"-ms-flex-item-align":e,"-ms-grid-row-align":e,alignSelf:e}}function s(e){void 0===e&&(e={});var n=e.define;return{value:function(e,t,i,l,o){if(void 0!==o)return e;var r=n&&n[t]||b[t];return r?r(e):e}}}var b={display:e,flexDirection:n,justifyContent:t,alignItems:i,order:l,flexGrow:o,flexShrink:r,flexBasis:f,flex:x,alignSelf:a};return s}(); //# sourceMappingURL=cssobj-plugin-flexbox.min.js.map