Daniel@0: // * =========================================================== * Daniel@0: // < LESSHat > Daniel@0: // * =========================================================== * Daniel@0: // Daniel@0: // Made with Energy drinks in Prague, Czech Republic. Daniel@0: // Handcrafted by Petr Brzek, lesshat.com Daniel@0: // Works great with CSS Hat csshat.com Daniel@0: Daniel@0: // version: v3.0.2 (2014-06-26) Daniel@0: Daniel@0: // TABLE OF MIXINS: Daniel@0: // align-content Daniel@0: // align-items Daniel@0: // align-self Daniel@0: // animation Daniel@0: // animation-delay Daniel@0: // animation-direction Daniel@0: // animation-duration Daniel@0: // animation-fill-mode Daniel@0: // animation-iteration-count Daniel@0: // animation-name Daniel@0: // animation-play-state Daniel@0: // animation-timing-function Daniel@0: // appearance Daniel@0: // backface-visibility Daniel@0: // background-clip Daniel@0: // background-image Daniel@0: // background-origin Daniel@0: // background-size Daniel@0: // blur Daniel@0: // border-bottom-left-radius Daniel@0: // border-bottom-right-radius Daniel@0: // border-image Daniel@0: // border-radius Daniel@0: // border-top-left-radius Daniel@0: // border-top-right-radius Daniel@0: // box-shadow Daniel@0: // box-sizing Daniel@0: // brightness Daniel@0: // calc Daniel@0: // column-count Daniel@0: // column-gap Daniel@0: // column-rule Daniel@0: // column-width Daniel@0: // columns Daniel@0: // contrast Daniel@0: // display Daniel@0: // drop-shadow Daniel@0: // filter Daniel@0: // flex Daniel@0: // flex-basis Daniel@0: // flex-direction Daniel@0: // flex-grow Daniel@0: // flex-shrink Daniel@0: // flex-wrap Daniel@0: // font-face Daniel@0: // grayscale Daniel@0: // hue-rotate Daniel@0: // hyphens Daniel@0: // invert Daniel@0: // justify-content Daniel@0: // keyframes Daniel@0: // opacity Daniel@0: // order Daniel@0: // perspective Daniel@0: // perspective-origin Daniel@0: // placeholder Daniel@0: // rotate Daniel@0: // rotate3d Daniel@0: // rotateX Daniel@0: // rotateY Daniel@0: // rotateZ Daniel@0: // saturate Daniel@0: // scale Daniel@0: // scale3d Daniel@0: // scaleX Daniel@0: // scaleY Daniel@0: // scaleZ Daniel@0: // selection Daniel@0: // sepia Daniel@0: // size Daniel@0: // skew Daniel@0: // skewX Daniel@0: // skewY Daniel@0: // transform Daniel@0: // transform-origin Daniel@0: // transform-style Daniel@0: // transition Daniel@0: // transition-delay Daniel@0: // transition-duration Daniel@0: // transition-property Daniel@0: // transition-timing-function Daniel@0: // translate Daniel@0: // translate3d Daniel@0: // translateX Daniel@0: // translateY Daniel@0: // translateZ Daniel@0: // user-select Daniel@0: Daniel@0: .align-content(...) { Daniel@0: @process: ~`(function(r){return r=r||"stretch"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_ms: ~`(function(t){return t=t||"stretch","flex-start"==t?t="start":"flex-end"==t?t="end":"space-between"==t?t="justify":"space-around"==t&&(t="distribute"),t})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-align-content: @process; Daniel@0: -ms-flex-line-pack: @process_ms; Daniel@0: align-content: @process; Daniel@0: } Daniel@0: Daniel@0: .align-items(...) { Daniel@0: @process_olderwebkit: ~`(function(t){return t=t||"stretch","flex-start"==t?t="start":"flex-end"==t&&(t="end"),t})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_moz: ~`(function(t){return t=t||"stretch","flex-start"==t?t="start":"flex-end"==t&&(t="end"),t})((function(){var t="@{arguments}";return t=t.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process: ~`(function(t){return t=t||"stretch"})((function(){var t="@{arguments}";return t=t.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_ms: ~`(function(t){return t=t||"stretch","flex-start"==t?t="start":"flex-end"==t&&(t="end"),t})((function(){var t="@{arguments}";return t=t.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-box-align: @process_olderwebkit; Daniel@0: -moz-box-align: @process_moz; Daniel@0: -webkit-align-items: @process; Daniel@0: -ms-flex-align: @process_ms; Daniel@0: align-items: @process; Daniel@0: } Daniel@0: Daniel@0: .align-self(...) { Daniel@0: @process: ~`(function(t){return t=t||"auto"})((function(){var t="@{arguments}";return t=t.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_ms: ~`(function(t){return t=t||"auto","flex-start"==t?t="start":"flex-end"==t&&(t="end"),t})((function(){var t="@{arguments}";return t=t.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-align-self: @process; Daniel@0: -ms-flex-item-align: @process_ms; Daniel@0: align-self: @process; Daniel@0: } Daniel@0: Daniel@0: .animation(...) { Daniel@0: @process: ~`(function(t){return t=t||"none",/^[^, ]*,/.test(t)&&(t=t.replace(/(?:,)(?![^(]*\))/g,"")),t})((function(){var t="@{arguments}";return t=t.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-animation: @process; Daniel@0: -moz-animation: @process; Daniel@0: -o-animation: @process; Daniel@0: animation: @process; Daniel@0: } Daniel@0: Daniel@0: .animation-delay(...) { Daniel@0: @process: ~`(function(t){t=t||"0";var r=/(?:\d)(?:ms|s)/gi,e=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(t)||"0"===t||(t=t.replace(e,function(t){return t+=parseFloat(t,10)>10?"ms":"s"})),t})((function(){var t="@{arguments}";return t=t.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-animation-delay: @process; Daniel@0: -moz-animation-delay: @process; Daniel@0: -o-animation-delay: @process; Daniel@0: animation-delay: @process; Daniel@0: } Daniel@0: Daniel@0: .animation-direction(...) { Daniel@0: @process: ~`(function(r){return r||"normal"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-animation-direction: @process; Daniel@0: -moz-animation-direction: @process; Daniel@0: -o-animation-direction: @process; Daniel@0: animation-direction: @process; Daniel@0: } Daniel@0: Daniel@0: .animation-duration(...) { Daniel@0: @process: ~`(function(r){r=r||"0";var t=/ms|s/gi,e=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return t.test(r)||"0"===r||(r=r.replace(e,function(r){return r+=parseFloat(r,10)>10?"ms":"s"})),r})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-animation-duration: @process; Daniel@0: -moz-animation-duration: @process; Daniel@0: -o-animation-duration: @process; Daniel@0: animation-duration: @process; Daniel@0: } Daniel@0: Daniel@0: .animation-fill-mode(...) { Daniel@0: @process: ~`(function(r){return r||"none"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-animation-fill-mode: @process; Daniel@0: -moz-animation-fill-mode: @process; Daniel@0: -o-animation-fill-mode: @process; Daniel@0: animation-fill-mode: @process; Daniel@0: } Daniel@0: Daniel@0: .animation-iteration-count(...) { Daniel@0: @process: ~`(function(r){return r||"0"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-animation-iteration-count: @process; Daniel@0: -moz-animation-iteration-count: @process; Daniel@0: -o-animation-iteration-count: @process; Daniel@0: animation-iteration-count: @process; Daniel@0: } Daniel@0: Daniel@0: .animation-name(...) { Daniel@0: @process: ~`(function(r){return r||"none"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-animation-name: @process; Daniel@0: -moz-animation-name: @process; Daniel@0: -o-animation-name: @process; Daniel@0: animation-name: @process; Daniel@0: } Daniel@0: Daniel@0: .animation-play-state(...) { Daniel@0: @process: ~`(function(r){return r||"running"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-animation-play-state: @process; Daniel@0: -moz-animation-play-state: @process; Daniel@0: -o-animation-play-state: @process; Daniel@0: animation-play-state: @process; Daniel@0: } Daniel@0: Daniel@0: .animation-timing-function(...) { Daniel@0: @process: ~`(function(r){return r||"ease"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-animation-timing-function: @process; Daniel@0: -moz-animation-timing-function: @process; Daniel@0: -o-animation-timing-function: @process; Daniel@0: animation-timing-function: @process; Daniel@0: } Daniel@0: Daniel@0: .appearance(...) { Daniel@0: @process: ~`(function(r){return r||"none"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-appearance: @process; Daniel@0: -moz-appearance: @process; Daniel@0: appearance: @process; Daniel@0: } Daniel@0: Daniel@0: .backface-visibility(...) { Daniel@0: @process: ~`(function(r){return r||"visible"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-backface-visibility: @process; Daniel@0: -moz-backface-visibility: @process; Daniel@0: -ms-backface-visibility: @process; Daniel@0: -o-backface-visibility: @process; Daniel@0: backface-visibility: @process; Daniel@0: } Daniel@0: Daniel@0: .background-clip(...) { Daniel@0: @process: ~`(function(r){return r||"border-box"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-background-clip: @process; Daniel@0: -moz-background-clip: @process; Daniel@0: background-clip: @process; Daniel@0: } Daniel@0: Daniel@0: .background-image(...) { Daniel@0: @process_ms: ~`(function(t){function e(t){var e,r,n,a,s,i,u,o,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=0,l=0,f="",d=[];if(!t)return t;do e=t.charCodeAt(c++),r=t.charCodeAt(c++),n=t.charCodeAt(c++),o=e<<16|r<<8|n,a=63&o>>18,s=63&o>>12,i=63&o>>6,u=63&o,d[l++]=g.charAt(a)+g.charAt(s)+g.charAt(i)+g.charAt(u);while(c',svg_start:'',linear_gradient_start:'",radial_gradient_end:"",rect_linear:'',rect_radial:'',svg_end:""};if(r.length){r.forEach(function(t){var e={};if(Object.keys(a).some(function(r){return t.indexOf(r)>=0?(e.svg_direction=a[r],!0):(e.svg_direction=!1,void 0)}),/linear/.test(t))e.svg_type="linear";else if(/radial/.test(t))e.svg_type="radial";else if(!/linear/.test(t)&&!/radial/.test(t))return e.url=t.trim(),e.svg_type="url",e.svg_direction=!0,n.push(e),!1;var r=t.match(/rgb|#[a-zA-Z0-9]|hsl/g).length;e.svg_stops=[],t=t.replace(/transparent/g,"rgba(0,0,0,0)"),t.match(/#[a-zA-Z0-9]/g)&&t.match(/(#[a-zA-Z0-9]+)\s*(\d+%)?/g).forEach(function(t){t=t.split(" "),e.svg_stops.push('')}),t.match(/rgba?\(\d+,\s*\d+,\s*\d+(?:,\s*(0|1|\.\d+|0\.\d+))?\)/g)&&t.replace(/rgba?\((\d+,\s*\d+,\s*\d+)(?:,\s*(0|1|\.\d+|0\.\d+))?\)\s*(\d+%)?/g,function(t,r,n,a){e.svg_stops.push('')}),t.match(/hsla?\((\d+,\s*\d+%,\s*\d+%),\s*(0|1|\.\d+|0\.\d+)\)/g)&&t.replace(/hsla?\((\d+,\s*\d+%,\s*\d+%),\s*(0|1|\.\d+|0\.\d+)\)\s*(\d+%)?/g,function(t,r,n,a){e.svg_stops.push('')});var s=Math.floor(100/(r-1));e.svg_stops.forEach(function(t,r){/offset="false"/.test(t)&&(e.svg_stops[r]=t.replace(/offset="false"/,'offset="'+s*r+'%"'))}),e.svg_stops.sort(function(t,e){return t=t.match(/offset="(\d+)%"/),e=e.match(/offset="(\d+)%"/),2==t.length&&2==e.length?t[1]-e[1]:void 0}),n.push(e)});var i=[],u=n.every(function(t){for(var e in t)if(0==t[e]||0==t[e].length)return!1;return!0});if(!u)return 8121991;n.forEach(function(t,e){("linear"==t.svg_type||"radial"==t.svg_type)&&(i[e]=s.xml+s.svg_start),"linear"==t.svg_type?(i[e]+=s.linear_gradient_start+" "+t.svg_direction+">",t.svg_stops.forEach(function(t){i[e]+=t}),i[e]+=s.linear_gradient_end,i[e]+=s.rect_linear,i[e]+=s.svg_end):"radial"==t.svg_type?(i[e]+=s.radial_gradient_start+" "+t.svg_direction+">",t.svg_stops.forEach(function(t){i[e]+=t}),i[e]+=s.radial_gradient_end,i[e]+=s.rect_radial,i[e]+=s.svg_end):"url"==t.svg_type&&(i[e]=t.url)}),i.forEach(function(t,r){/<\?xml version="1.0" \?>/g.test(t)&&(i[r]=s.uri_data+e(t)+")")}),t=i.join(",")}return t})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_webkit: ~`(function(t){if(t=t||8121991,8121991==t)return t;var e={"to bottom":"top","to left":"right","to top":"bottom","to right":"left","ellipse at center":"center, ellipse cover","circle closest-side":"center center, circle contain","circle farthest-corner":"center center, circle cover","circle farthest-side":"center center, circle cover","ellipse closest-side":"center center, ellipse contain","ellipse farthest-corner":"center center, ellipse cover","ellipse farthest-side":"center center, ellipse cover"},r=/(radial-gradient\()([a-z- ]+)at\s+(\w+%?)\s*(\w*%?)/g,n=Object.keys(e);return n.some(function(n){return t.indexOf(n)>=0?(t=t.replace(new RegExp(n+"(?![ a-z0-9])","g"),e[n]),!0):(r.test(t)&&(t=t.replace(r,function(t,e,r,n,a){return e.trim()+n.trim()+" "+a.trim()+","+r.replace(/closest-side/g,"contain").replace(/farthest-corner/g,"cover").trim()})),void 0)}),t=t.replace(/(\d+)\s*deg/g,function(t,e){return 90-e+"deg"}).replace(/(linear|radial)-gradient/g,"-webkit-$1-gradient")})((function(){var t="@{arguments}";return t=t.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_moz: ~`(function(e){if(e=e||8121991,8121991==e)return e;var t={"to bottom":"top","to left":"right","to top":"bottom","to right":"left","ellipse at center":"center, ellipse cover","circle closest-side":"center center, circle contain","circle farthest-corner":"center center, circle cover","circle farthest-side":"center center, circle cover","ellipse closest-side":"center center, ellipse contain","ellipse farthest-corner":"center center, ellipse cover","ellipse farthest-side":"center center, ellipse cover"},r=/(radial-gradient\()([a-z- ]+)at\s+(\w+%?)\s*(\w*%?)/g,n=Object.keys(t);return n.some(function(n){return e.indexOf(n)>=0?(e=e.replace(new RegExp(n+"(?![ a-z0-9])","g"),t[n]),!0):(r.test(e)&&(e=e.replace(r,function(e,t,r,n,a){return t.trim()+n.trim()+" "+a.trim()+","+r.replace(/closest-side/g,"contain").replace(/farthest-corner/g,"cover").trim()})),void 0)}),e=e.replace(/(\d+)\s*deg/g,function(e,t){return 90-t+"deg"}).replace(/(linear|radial)-gradient/g,"-moz-$1-gradient")})((function(){var t="@{arguments}";return t=t.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_opera: ~`(function(e){if(e=e||8121991,8121991==e)return e;var t={"to bottom":"top","to left":"right","to top":"bottom","to right":"left","ellipse at center":"center, ellipse cover","circle closest-side":"center center, circle contain","circle farthest-corner":"center center, circle cover","circle farthest-side":"center center, circle cover","ellipse closest-side":"center center, ellipse contain","ellipse farthest-corner":"center center, ellipse cover","ellipse farthest-side":"center center, ellipse cover"},r=/(radial-gradient\()([a-z- ]+)at\s+(\w+%?)\s*(\w*%?)/g,n=Object.keys(t);return n.some(function(n){return e.indexOf(n)>=0?(e=e.replace(new RegExp(n+"(?![ a-z0-9])","g"),t[n]),!0):(r.test(e)&&(e=e.replace(r,function(e,t,r,n,a){return t.trim()+n.trim()+" "+a.trim()+","+r.replace(/closest-side/g,"contain").replace(/farthest-corner/g,"cover").trim()})),void 0)}),e=e.replace(/(\d+)\s*deg/g,function(e,t){return 90-t+"deg"}).replace(/(linear|radial)-gradient/g,"-o-$1-gradient")})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process: ~`(function(e){if(e=e||8121991,8121991==e)return e;var t={top:"to bottom",right:"to left",bottom:"to top",left:"to right"},r=Object.keys(t);return r.some(function(r){return e.indexOf(r)>=0&&!new RegExp("to\\s+"+r+"|at\\s+"+r,"g").test(e)?(e=e.replace(new RegExp(r),t[r]),!0):void 0}),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: background-image: @process_ms; Daniel@0: background-image: @process_webkit; Daniel@0: background-image: @process_moz; Daniel@0: background-image: @process_opera; Daniel@0: background-image: @process; Daniel@0: } Daniel@0: Daniel@0: .background-origin(...) { Daniel@0: @process: ~`(function(e){return e||"padding-box"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-background-origin: @process; Daniel@0: -moz-background-origin: @process; Daniel@0: background-origin: @process; Daniel@0: } Daniel@0: Daniel@0: .background-size(...) { Daniel@0: @process: ~`(function(e){e=e||"auto auto";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-background-size: @process; Daniel@0: -moz-background-size: @process; Daniel@0: background-size: @process; Daniel@0: } Daniel@0: Daniel@0: .blur(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-filter: blur(@process); Daniel@0: -moz-filter: blur(@process); Daniel@0: -ms-filter: blur(@process); Daniel@0: filter: blur(@process); Daniel@0: } Daniel@0: Daniel@0: .border-bottom-left-radius(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-border-bottom-left-radius: @process; -webkit-background-clip: padding-box; Daniel@0: -moz-border-radius-bottomleft: @process; -moz-background-clip: padding; Daniel@0: border-bottom-left-radius: @process; background-clip: padding-box; Daniel@0: } Daniel@0: Daniel@0: .border-bottom-right-radius(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-border-bottom-right-radius: @process; -webkit-background-clip: padding-box; Daniel@0: -moz-border-radius-bottomright: @process; -moz-background-clip: padding; Daniel@0: border-bottom-right-radius: @process; background-clip: padding-box; Daniel@0: } Daniel@0: Daniel@0: .border-image(...) { Daniel@0: @process: ~`(function(e){return e=e||8121991,/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-border-image: @process; Daniel@0: -moz-border-image: @process; Daniel@0: -o-border-image: @process; Daniel@0: border-image: @process; Daniel@0: } Daniel@0: Daniel@0: .border-radius(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-border-radius: @process; -webkit-background-clip: padding-box; Daniel@0: -moz-border-radius: @process; -moz-background-clip: padding; Daniel@0: border-radius: @process; background-clip: padding-box; Daniel@0: } Daniel@0: Daniel@0: .border-top-left-radius(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-border-top-left-radius: @process; -webkit-background-clip: padding-box; Daniel@0: -moz-border-radius-topleft: @process; -moz-background-clip: padding; Daniel@0: border-top-left-radius: @process; background-clip: padding-box; Daniel@0: } Daniel@0: Daniel@0: .border-top-right-radius(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-border-top-right-radius: @process; -webkit-background-clip: padding-box; Daniel@0: -moz-border-radius-topright: @process; -moz-background-clip: padding; Daniel@0: border-top-right-radius: @process; background-clip: padding-box; Daniel@0: } Daniel@0: Daniel@0: .box-shadow(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-box-shadow: @process; Daniel@0: -moz-box-shadow: @process; Daniel@0: box-shadow: @process; Daniel@0: } Daniel@0: Daniel@0: .box-sizing(...) { Daniel@0: @process: ~`(function(e){return e=e||"content-box"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-box-sizing: @process; Daniel@0: -moz-box-sizing: @process; Daniel@0: box-sizing: @process; Daniel@0: } Daniel@0: Daniel@0: .brightness(...) { Daniel@0: @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-filter: brightness(@process); Daniel@0: -moz-filter: brightness(@process); Daniel@0: -ms-filter: brightness(@process); Daniel@0: filter: brightness(@process); Daniel@0: } Daniel@0: Daniel@0: .calc(...) { Daniel@0: @process: ~`(function(e){function t(t,r){var a=");\n",c=n.split(","),i=c[0]+":"+t+"("+(c[1].trim()||0)+a;"start"==r?e="0;\n"+i:e+=i}e=e||8121991;var r="@{state}",n=e;if(8121991==e)return e;switch(r){case"1":t("-webkit-calc","start"),t("-moz-calc"),t("calc");break;case"2":t("-webkit-calc","start"),t("-moz-calc");break;case"3":t("-webkit-calc","start"),t("calc");break;case"4":t("-webkit-calc","start");break;case"5":t("-moz-calc","start"),t("calc");break;case"6":t("-moz-calc","start");break;case"7":t("calc","start")}return e=e.replace(/;$/g,"")})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @state: 1; -lh-property: @process; Daniel@0: Daniel@0: } Daniel@0: Daniel@0: .column-count(...) { Daniel@0: @process: ~`(function(e){return e=e||"auto"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-column-count: @process; Daniel@0: -moz-column-count: @process; Daniel@0: column-count: @process; Daniel@0: } Daniel@0: Daniel@0: .column-gap(...) { Daniel@0: @process: ~`(function(e){e=e||"normal";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-column-gap: @process; Daniel@0: -moz-column-gap: @process; Daniel@0: column-gap: @process; Daniel@0: } Daniel@0: Daniel@0: .column-rule(...) { Daniel@0: @process: ~`(function(e){e=e||"medium none black";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-column-rule: @process; Daniel@0: -moz-column-rule: @process; Daniel@0: column-rule: @process; Daniel@0: } Daniel@0: Daniel@0: .column-width(...) { Daniel@0: @process: ~`(function(e){e=e||"auto";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-column-width: @process; Daniel@0: -moz-column-width: @process; Daniel@0: column-width: @process; Daniel@0: } Daniel@0: Daniel@0: .columns(...) { Daniel@0: @process: ~`(function(e){e=e||"auto auto";var t=/^\d+$/;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,""),e=e.split(" ")),t.test(e[0])&&(e[0]=e[0]+"px"),e.join(" ")})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-columns: @process; Daniel@0: -moz-columns: @process; Daniel@0: columns: @process; Daniel@0: } Daniel@0: Daniel@0: .contrast(...) { Daniel@0: @process: ~`(function(e){e=e||"100%";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"%"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-filter: ~"contrast(@{process})"; Daniel@0: -moz-filter: ~"contrast(@{process})"; Daniel@0: -ms-filter: ~"contrast(@{process})"; Daniel@0: filter: ~"contrast(@{process})"; Daniel@0: } Daniel@0: Daniel@0: .display(...) { Daniel@0: @process_oldwebkit: ~`(function(e){return e="flex"==e||"inline-flex"==e?"-webkit-box":8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_moz: ~`(function(e){return e="flex"==e||"inline-flex"==e?"-moz-box":8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_webkit: ~`(function(e){return e="flex"==e||"inline-flex"==e?"-webkit-"+e:8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_ms: ~`(function(e){return e="flex"==e?"-ms-flexbox":"inline-flex"==e?"-ms-inline-flexbox":8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process: ~`(function(e){return"flex"!=e&&"inline-flex"!=e&&(e=8121991),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: display: @process_oldwebkit; Daniel@0: display: @process_moz; Daniel@0: display: @process_webkit; Daniel@0: display: @process_ms; Daniel@0: display: @process; Daniel@0: } Daniel@0: Daniel@0: .drop-shadow(...) { Daniel@0: @process: ~`(function(e){if(e=e||8121991,8121991==e)return e;var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-filter: drop-shadow(@process); Daniel@0: -moz-filter: drop-shadow(@process); Daniel@0: -ms-filter: drop-shadow(@process); Daniel@0: filter: drop-shadow(@process); Daniel@0: } Daniel@0: Daniel@0: .filter(...) { Daniel@0: @process: ~`(function(e){return e=e||"none",/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-filter: @process; Daniel@0: -moz-filter: @process; Daniel@0: -ms-filter: @process; Daniel@0: filter: @process; Daniel@0: } Daniel@0: Daniel@0: .flex(...) { Daniel@0: @process_olderwebkit: ~`(function(e){return/^\d+/.test(e)?e=e.match(/^\d+/)[0]:""==e&&(e="0"),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_moz: ~`(function(e){return/^\d+/.test(e)?e=e.match(/^\d+/)[0]:""==e&&(e="0"),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process: ~`(function(e){return e=e||"0 1 auto",/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-box-flex: @process_olderwebkit; Daniel@0: -moz-box-flex: @process_moz; Daniel@0: -webkit-flex: @process; Daniel@0: -ms-flex: @process; Daniel@0: flex: @process; Daniel@0: } Daniel@0: Daniel@0: .flex-basis(...) { Daniel@0: @process: ~`(function(e){e=e||"auto";var t=/\d/gi,r=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return t.test(e)&&(e=e.replace(r,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-flex-basis: @process; Daniel@0: flex-basis: @process; Daniel@0: } Daniel@0: Daniel@0: .flex-direction(...) { Daniel@0: @process_oldestwebkit: ~`(function(e){return e="row"==e||"column"==e?"normal":"row-reverse"==e||"column-reverse"==e?"reverse":8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_oldermoz: ~`(function(e){return e="row"==e||"column"==e?"normal":"row-reverse"==e||"column-reverse"==e?"reverse":8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_olderwebkit: ~`(function(e){return e="row"==e||"row-reverse"==e?"horizontal":"column"==e||"column-reverse"==e?"vertical":8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_moz: ~`(function(e){return e="row"==e||"row-reverse"==e?"horizontal":"column"==e||"column-reverse"==e?"vertical":8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process: ~`(function(e){return e=e||"row"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-box-direction: @process_oldestwebkit; Daniel@0: -moz-box-direction: @process_oldermoz; Daniel@0: -webkit-box-orient: @process_olderwebkit; Daniel@0: -moz-box-orient: @process_moz; Daniel@0: -webkit-flex-direction: @process; Daniel@0: -ms-flex-direction: @process; Daniel@0: flex-direction: @process; Daniel@0: } Daniel@0: Daniel@0: .flex-grow(...) { Daniel@0: @process: ~`(function(e){return e=e||"0"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-flex-grow: @process; Daniel@0: flex-grow: @process; Daniel@0: } Daniel@0: Daniel@0: .flex-shrink(...) { Daniel@0: @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-flex-shrink: @process; Daniel@0: flex-shrink: @process; Daniel@0: } Daniel@0: Daniel@0: .flex-wrap(...) { Daniel@0: @process: ~`(function(e){return e=e||"nowrap"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-flex-wrap: @process; Daniel@0: -ms-flex-wrap: @process; Daniel@0: flex-wrap: @process; Daniel@0: } Daniel@0: Daniel@0: .font-face(@fontname, @fontfile, @fontweight:normal, @fontstyle:normal) { Daniel@0: font-family: "@{fontname}"; Daniel@0: src: url("@{fontfile}.eot"); Daniel@0: src: url("@{fontfile}.eot?#iefix") format("embedded-opentype"), Daniel@0: url("@{fontfile}.woff") format("woff"), Daniel@0: url("@{fontfile}.ttf") format("truetype"), Daniel@0: url("@{fontfile}.svg#@{fontname}") format("svg"); Daniel@0: font-weight: @fontweight; Daniel@0: font-style: @fontstyle; Daniel@0: } Daniel@0: Daniel@0: .grayscale(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"%"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-filter: grayscale(@process); Daniel@0: -moz-filter: grayscale(@process); Daniel@0: -ms-filter: grayscale(@process); Daniel@0: filter: grayscale(@process); Daniel@0: } Daniel@0: Daniel@0: .hue-rotate(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"deg"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-filter: hue-rotate(@process); Daniel@0: -moz-filter: hue-rotate(@process); Daniel@0: -ms-filter: hue-rotate(@process); Daniel@0: filter: hue-rotate(@process); Daniel@0: } Daniel@0: Daniel@0: .hyphens(...) { Daniel@0: @process: ~`(function(e){return e=e||"manual"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-hyphens: @process; Daniel@0: -moz-hyphens: @process; Daniel@0: -ms-hyphens: @process; Daniel@0: hyphens: @process; Daniel@0: } Daniel@0: Daniel@0: .invert(...) { Daniel@0: @process: ~`(function(e){e=e||"100%";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"%"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-filter: invert(@process); Daniel@0: -moz-filter: invert(@process); Daniel@0: -ms-filter: invert(@process); Daniel@0: filter: invert(@process); Daniel@0: } Daniel@0: Daniel@0: .justify-content(...) { Daniel@0: @process_oldestWebkit: ~`(function(e){return e=e||"start","flex-start"==e?e="start":"flex-end"==e?e="end":("space-between"==e||"space-around"==e)&&(e="justify"),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_moz: ~`(function(e){return e=e||"start","flex-start"==e?e="start":"flex-end"==e?e="end":("space-between"==e||"space-around"==e)&&(e="justify"),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_ms: ~`(function(e){return e=e||"start","flex-start"==e?e="start":"flex-end"==e?e="end":"space-between"==e?e="justify":"space-around"==e&&(e="distribute"),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process: ~`(function(e){return e=e||"flex-start"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-box-pack: @process_oldestWebkit; Daniel@0: -moz-box-pack: @process_moz; Daniel@0: -ms-flex-pack: @process_ms; Daniel@0: -webkit-justify-content: @process; Daniel@0: justify-content: @process; Daniel@0: } Daniel@0: Daniel@0: .keyframes(...) { Daniel@0: @process: ~`(function(e){function r(r,t,c){var i="}\n",u=n.split(/(^[a-zA-Z0-9-]+),/g),s=t+" "+u[1]+"{",o=["-webkit-","-moz-","-ms-",""];c?a.forEach(function(r){-1!==e.indexOf(r)&&(u[2]=u[2].replace(new RegExp(r,"g"),function(e){return c+e}))}):u[2]=u[2].replace(/{([^}]+)}/g,function(e,r){var t=r.split(";");t.forEach(function(e,r){a.forEach(function(n){-1!==e.indexOf(n)&&(t[r]="",o.forEach(function(a){t[r]+=e.trim().replace(new RegExp(n,"g"),function(e){return a+e})+";"}))})});var n=t.join(";").replace(/;;/g,";");return e.replace(r,n)}),s+=u[2]+i,"start"==r?e="0; } \n"+s:"startend"==r?e="0; } \n"+s.replace(i,""):e+="end"==r?s.replace(i,""):s}e=e||8121991;var t="@{state}",n=e;if(8121991==e)return e;var a=["animation","transform","filter"];switch(t){case"1":r("start","@-webkit-keyframes","-webkit-"),r(null,"@-moz-keyframes","-moz-"),r(null,"@-o-keyframes","-o-"),r("end","@keyframes");break;case"2":r("start","@-webkit-keyframes","-webkit-"),r(null,"@-moz-keyframes","-moz-"),r("end","@keyframes");break;case"3":r("start","@-webkit-keyframes","-webkit-"),r(null,"@-moz-keyframes","-moz-"),r("end","@-o-keyframes","-o-");break;case"4":r("start","@-webkit-keyframes","-webkit-"),r(null,"@-o-keyframes","-o-"),r("end","@keyframes");break;case"5":r("start","@-webkit-keyframes","-webkit-"),r("end","@-moz-keyframes","-moz-");break;case"6":r("start","@-webkit-keyframes","-webkit-"),r("end","@-o-keyframes","-o-");break;case"7":r("start","@-webkit-keyframes","-webkit-"),r("end","@keyframes");break;case"8":r("startend","@-webkit-keyframes","-webkit-");break;case"9":r("start","@-moz-keyframes","-moz-"),r(null,"@-o-keyframes","-o-"),r("end","@keyframes");break;case"10":r("start","@-moz-keyframes","-moz-"),r("end","@-o-keyframes","-o-");break;case"11":r("start","@-moz-keyframes","-moz-"),r("end","@keyframes");break;case"12":r("startend","@-moz-keyframes","-moz-");break;case"13":r("start","@-o-keyframes","-o-"),r("end","@keyframes");break;case"14":r("startend","@-o-keyframes","-o-");break;case"15":r("startend","@keyframes")}return e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @state: 1; lesshat-selector { -lh-property: @process; } Daniel@0: Daniel@0: Daniel@0: Daniel@0: } Daniel@0: Daniel@0: .opacity(...) { Daniel@0: @process_ms: ~`(function(e){return e=e||"filter: alpha(opacity=100)","alpha(opacity="+Math.floor(100*e)+")"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: zoom: 1; filter: @process_ms; Daniel@0: -webkit-opacity: @process; Daniel@0: -moz-opacity: @process; Daniel@0: opacity: @process; Daniel@0: } Daniel@0: Daniel@0: .order(...) { Daniel@0: @process: ~`(function(e){return e=e||"0"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-box-ordinal-group: @process; Daniel@0: -moz-box-ordinal-group: @process; Daniel@0: -ms-flex-order: @process; Daniel@0: -webkit-order: @process; Daniel@0: order: @process; Daniel@0: } Daniel@0: Daniel@0: .perspective(...) { Daniel@0: @process: ~`(function(e){e=e||"none";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-perspective: @process; Daniel@0: -moz-perspective: @process; Daniel@0: perspective: @process; Daniel@0: } Daniel@0: Daniel@0: .perspective-origin(...) { Daniel@0: @process: ~`(function(e){e=e||"50% 50%";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"%"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-perspective-origin: @process; Daniel@0: -moz-perspective-origin: @process; Daniel@0: perspective-origin: @process; Daniel@0: } Daniel@0: Daniel@0: .placeholder(@color:#aaa, @element: 08121991) { Daniel@0: .inception (@arguments) when not (@element = 08121991) { Daniel@0: @{element}::-webkit-input-placeholder { Daniel@0: color: @color; Daniel@0: } Daniel@0: @{element}:-moz-placeholder { Daniel@0: color: @color; Daniel@0: } Daniel@0: @{element}::-moz-placeholder { Daniel@0: color: @color; Daniel@0: } Daniel@0: @{element}:-ms-input-placeholder { Daniel@0: color: @color; Daniel@0: } Daniel@0: } Daniel@0: .inception (@arguments) when (@element = 08121991) { Daniel@0: &::-webkit-input-placeholder { Daniel@0: color: @color; Daniel@0: } Daniel@0: &:-moz-placeholder { Daniel@0: color: @color; Daniel@0: } Daniel@0: &::-moz-placeholder { Daniel@0: color: @color; Daniel@0: } Daniel@0: &:-ms-input-placeholder { Daniel@0: color: @color; Daniel@0: } Daniel@0: } Daniel@0: .inception(@arguments); Daniel@0: } Daniel@0: Daniel@0: .rotate(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"deg"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: rotate(@process); Daniel@0: -moz-transform: rotate(@process); Daniel@0: -ms-transform: rotate(@process); Daniel@0: -o-transform: rotate(@process); Daniel@0: transform: rotate(@process); Daniel@0: } Daniel@0: Daniel@0: .rotate3d(...) { Daniel@0: @process: ~`(function(e){return e=e||"0, 0, 0, 0",e=e.replace(/,\s*\d+$/,function(e){return e+"deg"})})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: rotate3d(@process); Daniel@0: -moz-transform: rotate3d(@process); Daniel@0: -ms-transform: rotate3d(@process); Daniel@0: -o-transform: rotate3d(@process); Daniel@0: transform: rotate3d(@process); Daniel@0: } Daniel@0: Daniel@0: .rotateX(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"deg"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: rotateX(@process); Daniel@0: -moz-transform: rotateX(@process); Daniel@0: -ms-transform: rotateX(@process); Daniel@0: -o-transform: rotateX(@process); Daniel@0: transform: rotateX(@process); Daniel@0: } Daniel@0: Daniel@0: .rotateY(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"deg"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: rotateY(@process); Daniel@0: -moz-transform: rotateY(@process); Daniel@0: -ms-transform: rotateY(@process); Daniel@0: -o-transform: rotateY(@process); Daniel@0: transform: rotateY(@process); Daniel@0: } Daniel@0: Daniel@0: .rotateZ(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"deg"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: rotateZ(@process); Daniel@0: -moz-transform: rotateZ(@process); Daniel@0: -ms-transform: rotateZ(@process); Daniel@0: -o-transform: rotateZ(@process); Daniel@0: transform: rotateZ(@process); Daniel@0: } Daniel@0: Daniel@0: .saturate(...) { Daniel@0: @process: ~`(function(e){e=e||"100%";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"%"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-filter: ~"saturate(@{process})"; Daniel@0: -moz-filter: ~"saturate(@{process})"; Daniel@0: -ms-filter: ~"saturate(@{process})"; Daniel@0: filter: ~"saturate(@{process})"; Daniel@0: } Daniel@0: Daniel@0: .scale(...) { Daniel@0: @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: scale(@process); Daniel@0: -moz-transform: scale(@process); Daniel@0: -ms-transform: scale(@process); Daniel@0: -o-transform: scale(@process); Daniel@0: transform: scale(@process); Daniel@0: } Daniel@0: Daniel@0: .scale3d(...) { Daniel@0: @process: ~`(function(e){return e=e||"1, 1, 1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: scale3d(@process); Daniel@0: -moz-transform: scale3d(@process); Daniel@0: -ms-transform: scale3d(@process); Daniel@0: -o-transform: scale3d(@process); Daniel@0: transform: scale3d(@process); Daniel@0: } Daniel@0: Daniel@0: .scaleX(...) { Daniel@0: @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: scaleX(@process); Daniel@0: -moz-transform: scaleX(@process); Daniel@0: -ms-transform: scaleX(@process); Daniel@0: -o-transform: scaleX(@process); Daniel@0: transform: scaleX(@process); Daniel@0: } Daniel@0: Daniel@0: .scaleY(...) { Daniel@0: @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: scaleY(@process); Daniel@0: -moz-transform: scaleY(@process); Daniel@0: -ms-transform: scaleY(@process); Daniel@0: -o-transform: scaleY(@process); Daniel@0: transform: scaleY(@process); Daniel@0: } Daniel@0: Daniel@0: .scaleZ(...) { Daniel@0: @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: scaleZ(@process); Daniel@0: -moz-transform: scaleZ(@process); Daniel@0: -ms-transform: scaleZ(@process); Daniel@0: -o-transform: scaleZ(@process); Daniel@0: transform: scaleZ(@process); Daniel@0: } Daniel@0: Daniel@0: .selection(...) { Daniel@0: @process: ~`(function(e){function r(r,t){var a="}\n",c=n.split(","),u=(c[1]||"")+t+"{"+c[0]+a;"start"==r?e="0; } \n"+u:"startend"==r?e="0; } \n"+u.replace(a,""):e+="end"==r?u.replace(a,""):u}e=e||8121991;var t="@{state}",n=e;if(8121991==e)return e;switch(t){case"1":r("start","::selection"),r("end","::-moz-selection");break;case"2":r("startend","::selection");break;case"3":r("startend","::-moz-selection")}return e=e.replace(/;$/g,"")})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @state: 1; lesshat-selector { -lh-property: @process; } Daniel@0: Daniel@0: } Daniel@0: Daniel@0: .sepia(...) { Daniel@0: @process: ~`(function(e){e=e||"100%";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"%"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-filter: sepia(@process); Daniel@0: -moz-filter: sepia(@process); Daniel@0: -ms-filter: sepia(@process); Daniel@0: filter: sepia(@process); Daniel@0: } Daniel@0: Daniel@0: .size(@square) { Daniel@0: @unit: 'px'; Daniel@0: .process(@square) when (ispixel(@square)), (isem(@square)), (ispercentage(@square)), (iskeyword(@square)) { Daniel@0: width: @square; Daniel@0: height: @square; Daniel@0: } Daniel@0: Daniel@0: .process(@square) when not (ispixel(@square)) and not (isem(@square)) and not (ispercentage(@square)) and not (isstring(@square)) and not (iskeyword(@square)) { Daniel@0: width: ~`@{square} + @{unit}`; Daniel@0: height: ~`@{square} + @{unit}`; Daniel@0: } Daniel@0: Daniel@0: .process(@square); Daniel@0: Daniel@0: } Daniel@0: Daniel@0: .size(@width, @height) { Daniel@0: @unit: 'px'; Daniel@0: .process(@width, @height) when (ispixel(@width)), (isem(@width)), (ispercentage(@width)), (iskeyword(@width)) { Daniel@0: .kittens(@height) when (ispixel(@height)), (isem(@height)), (ispercentage(@height)), (iskeyword(@height)) { Daniel@0: width: @width; Daniel@0: height: @height; Daniel@0: } Daniel@0: .kittens(@height) when not (ispixel(@height)) and not (isem(@height)) and not (ispercentage(@height)) and not (iskeyword(@height)) { Daniel@0: width: @width; Daniel@0: height: ~`@{height} + @{unit}`; Daniel@0: } Daniel@0: .kittens(@height); Daniel@0: } Daniel@0: Daniel@0: .process(@width, @height) when (ispixel(@height)), (isem(@height)), (ispercentage(@height)), (iskeyword(@height)) { Daniel@0: .kittens(@width) when (ispixel(@width)), (isem(@width)), (ispercentage(@width)), (iskeyword(@width)) {} Daniel@0: .kittens(@width) when not (ispixel(@width)) and not (isem(@width)) and not (ispercentage(@width)) and not (iskeyword(@width)) { Daniel@0: width: ~`@{width} + @{unit}`; Daniel@0: height: @height; Daniel@0: } Daniel@0: .kittens(@width); Daniel@0: } Daniel@0: Daniel@0: .process(@width, @height) when not (ispixel(@width)) and not (isem(@width)) and not (ispercentage(@width)) and not (iskeyword(@width)) and not (ispixel(@height)) and not (isem(@height)) and not (ispercentage(@height)) and not (iskeyword(@height)) { Daniel@0: width: ~`@{width} + @{unit}`; Daniel@0: height: ~`@{height} + @{unit}`; Daniel@0: } Daniel@0: Daniel@0: .process(@width, @height); Daniel@0: Daniel@0: } Daniel@0: Daniel@0: .skew(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"deg"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: skew(@process); Daniel@0: -moz-transform: skew(@process); Daniel@0: -ms-transform: skew(@process); Daniel@0: -o-transform: skew(@process); Daniel@0: transform: skew(@process); Daniel@0: } Daniel@0: Daniel@0: .skewX(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"deg"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: skewX(@process); Daniel@0: -moz-transform: skewX(@process); Daniel@0: -ms-transform: skewX(@process); Daniel@0: -o-transform: skewX(@process); Daniel@0: transform: skewX(@process); Daniel@0: } Daniel@0: Daniel@0: .skewY(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"deg"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: skewY(@process); Daniel@0: -moz-transform: skewY(@process); Daniel@0: -ms-transform: skewY(@process); Daniel@0: -o-transform: skewY(@process); Daniel@0: transform: skewY(@process); Daniel@0: } Daniel@0: Daniel@0: .transform(...) { Daniel@0: @process: ~`(function(e){e=e||"none";var r={translate:"px",rotate:"deg",rotate3d:"deg",skew:"deg"};/^\w*\(?[a-z0-9.]*\)?/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,""));for(var t in r)e.indexOf(t)>=0&&(e=e.replace(new RegExp(t+"[\\w]?\\([a-z0-9, %]*\\)"),function(e){var n=/(\d+\.?\d*)(?!\w|%)/g;return"rotate3d"==t&&(n=/,\s*\d+$/),e.replace(n,function(e){return e+r[t]})}));return e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform: @process; Daniel@0: -moz-transform: @process; Daniel@0: -ms-transform: @process; Daniel@0: -o-transform: @process; Daniel@0: transform: @process; Daniel@0: } Daniel@0: Daniel@0: .transform-origin(...) { Daniel@0: @process: ~`(function(e){e=e||"50% 50% 0";var r=/\d/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),r.test(e)&&(e=e.replace(t,function(e){return 0==e&&e||e+"%"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform-origin: @process; Daniel@0: -moz-transform-origin: @process; Daniel@0: -ms-transform-origin: @process; Daniel@0: -o-transform-origin: @process; Daniel@0: transform-origin: @process; Daniel@0: } Daniel@0: Daniel@0: .transform-style(...) { Daniel@0: @process: ~`(function(e){return e=e||"flat"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transform-style: @process; Daniel@0: -moz-transform-style: @process; Daniel@0: -ms-transform-style: @process; Daniel@0: -o-transform-style: @process; Daniel@0: transform-style: @process; Daniel@0: } Daniel@0: Daniel@0: .transition(...) { Daniel@0: @process_webkit: ~`(function(e){e=e||"all 0 ease 0";var r=["background-size","border-radius","border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","box-shadow","column","transform","filter"],t="-webkit-",n=/(?:\d)(?:ms|s)/gi,a=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),r.forEach(function(r){-1!==e.indexOf(r)&&(e=e.replace(new RegExp(r,"g"),function(e){return t+e}))}),n.test(e)||"0"===e||(e=e.replace(a,function(e){return e+=parseFloat(e,10)>10?"ms":"s"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_moz: ~`(function(e){e=e||"all 0 ease 0";var r=["background-size","box-shadow","column","transform","filter"],t="-moz-",n=/(?:\d)(?:ms|s)/gi,a=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),r.forEach(function(r){-1!==e.indexOf(r)&&(e=e.replace(new RegExp(r,"g"),function(e){return t+e}))}),n.test(e)||"0"===e||(e=e.replace(a,function(e){return e+=parseFloat(e,10)>10?"ms":"s"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_opera: ~`(function(e){e=e||"all 0 ease 0";var r=["transform"],t="-o-",n=/(?:\d)(?:ms|s)/gi,a=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%)/gi;return/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),r.forEach(function(r){-1!==e.indexOf(r)&&(e=e.replace(new RegExp(r,"g"),function(e){return t+e}))}),n.test(e)||"0"===e||(e=e.replace(a,function(e){return e+=parseFloat(e,10)>10?"ms":"s"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process: ~`(function(e){e=e||"all 0 ease 0";var r=["-webkit-","-moz-","-o-",""],t=["column","transform","filter"],n=/(?:\d)(?:ms|s)/gi,a=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%)/gi;/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,""));var c=e.split(/(?:,)(?![^(]*\))/g);return c.forEach(function(e,n){t.forEach(function(t){-1!==e.indexOf(t)&&(c[n]="",r.forEach(function(a,u){c[n]+=e.trim().replace(new RegExp(t,"g"),function(e){return a+e}),u10?"ms":"s"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transition: @process_webkit; Daniel@0: -moz-transition: @process_moz; Daniel@0: -o-transition: @process_opera; Daniel@0: transition: @process; Daniel@0: } Daniel@0: Daniel@0: .transition-delay(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var r=/(?:\d)(?:ms|s)/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)||"0"===e||(e=e.replace(t,function(e){return e+=parseFloat(e,10)>10?"ms":"s"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transition-delay: @process; Daniel@0: -moz-transition-delay: @process; Daniel@0: -o-transition-delay: @process; Daniel@0: transition-delay: @process; Daniel@0: } Daniel@0: Daniel@0: .transition-duration(...) { Daniel@0: @process: ~`(function(e){e=e||"0";var r=/ms|s/gi,t=/(?:\s|^)(\.?\d+\.?\d*)(?![^(]*\)|\w|%|\.)/gi;return r.test(e)||"0"===e||(e=e.replace(t,function(e){return e+=parseFloat(e,10)>10?"ms":"s"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: -webkit-transition-duration: @process; Daniel@0: -moz-transition-duration: @process; Daniel@0: -o-transition-duration: @process; Daniel@0: transition-duration: @process; Daniel@0: } Daniel@0: Daniel@0: .transition-property(...) { Daniel@0: @process_webkit: ~`(function(e){e=e||"all";var r=["background-size","border-radius","border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","box-shadow","column","transform","filter"],t="-webkit-";return r.forEach(function(r){-1!==e.indexOf(r)&&(e=e.replace(new RegExp(r,"g"),function(e){return t+e}))}),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_moz: ~`(function(e){e=e||"all";var r=["background-size","box-shadow","column","transform","filter"],t="-moz-";return r.forEach(function(r){-1!==e.indexOf(r)&&(e=e.replace(new RegExp(r,"g"),function(e){return t+e}))}),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process_opera: ~`(function(e){e=e||"all";var r=["transform"],t="-o-";return r.forEach(function(r){-1!==e.indexOf(r)&&(e=e.replace(new RegExp(r,"g"),function(e){return t+e}))}),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`; Daniel@0: @process: ~`(function(e){e=e||"all";var r=["-webkit-","-moz-","-o-",""],t=["column","transform","filter"],n=e.split(/(?:,)(?![^(]*\))/g);return n.forEach(function(e,a){t.forEach(function(t){-1!==e.indexOf(t)&&(n[a]="",r.forEach(function(c,u){n[a]+=e.trim().replace(new RegExp(t,"g"),function(e){return c+e}),u