lesshat.less 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892
  1. // * =========================================================== *
  2. // < LESSHat >
  3. // * =========================================================== *
  4. //
  5. // Made with Energy drinks in Prague, Czech Republic.
  6. // Handcrafted by Petr Brzek, lesshat.com
  7. // Works great with CSS Hat csshat.com
  8. // version: v3.0.2 (2014-06-17)
  9. // TABLE OF MIXINS:
  10. // align-content
  11. // align-items
  12. // align-self
  13. // animation
  14. // animation-delay
  15. // animation-direction
  16. // animation-duration
  17. // animation-fill-mode
  18. // animation-iteration-count
  19. // animation-name
  20. // animation-play-state
  21. // animation-timing-function
  22. // appearance
  23. // backface-visibility
  24. // background-clip
  25. // background-image
  26. // background-origin
  27. // background-size
  28. // blur
  29. // border-bottom-left-radius
  30. // border-bottom-right-radius
  31. // border-image
  32. // border-radius
  33. // border-top-left-radius
  34. // border-top-right-radius
  35. // box-shadow
  36. // box-sizing
  37. // brightness
  38. // calc
  39. // column-count
  40. // column-gap
  41. // column-rule
  42. // column-width
  43. // columns
  44. // contrast
  45. // display
  46. // drop-shadow
  47. // filter
  48. // flex
  49. // flex-basis
  50. // flex-direction
  51. // flex-grow
  52. // flex-shrink
  53. // flex-wrap
  54. // font-face
  55. // grayscale
  56. // hue-rotate
  57. // hyphens
  58. // invert
  59. // justify-content
  60. // keyframes
  61. // opacity
  62. // order
  63. // perspective
  64. // perspective-origin
  65. // placeholder
  66. // rotate
  67. // rotate3d
  68. // rotateX
  69. // rotateY
  70. // rotateZ
  71. // saturate
  72. // scale
  73. // scale3d
  74. // scaleX
  75. // scaleY
  76. // scaleZ
  77. // selection
  78. // sepia
  79. // size
  80. // skew
  81. // skewX
  82. // skewY
  83. // transform
  84. // transform-origin
  85. // transform-style
  86. // transition
  87. // transition-delay
  88. // transition-duration
  89. // transition-property
  90. // transition-timing-function
  91. // translate
  92. // translate3d
  93. // translateX
  94. // translateY
  95. // translateZ
  96. // user-select
  97. .align-content(...) {
  98. @process: ~`(function(r){return r=r||"stretch"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`;
  99. @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,"")})())`;
  100. -webkit-align-content: @process;
  101. -ms-flex-line-pack: @process_ms;
  102. align-content: @process;
  103. }
  104. .align-items(...) {
  105. @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,"")})())`;
  106. @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,"")})())`;
  107. @process: ~`(function(t){return t=t||"stretch"})((function(){var t="@{arguments}";return t=t.replace(/^\[|\]$/g,"")})())`;
  108. @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,"")})())`;
  109. -webkit-box-align: @process_olderwebkit;
  110. -moz-box-align: @process_moz;
  111. -webkit-align-items: @process;
  112. -ms-flex-align: @process_ms;
  113. align-items: @process;
  114. }
  115. .align-self(...) {
  116. @process: ~`(function(t){return t=t||"auto"})((function(){var t="@{arguments}";return t=t.replace(/^\[|\]$/g,"")})())`;
  117. @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,"")})())`;
  118. -webkit-align-self: @process;
  119. -ms-flex-item-align: @process_ms;
  120. align-self: @process;
  121. }
  122. .animation(...) {
  123. @process: ~`(function(t){return t=t||"none",/^[^, ]*,/.test(t)&&(t=t.replace(/(?:,)(?![^(]*\))/g,"")),t})((function(){var t="@{arguments}";return t=t.replace(/^\[|\]$/g,"")})())`;
  124. -webkit-animation: @process;
  125. -moz-animation: @process;
  126. -o-animation: @process;
  127. animation: @process;
  128. }
  129. .animation-delay(...) {
  130. @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,"")})())`;
  131. -webkit-animation-delay: @process;
  132. -moz-animation-delay: @process;
  133. -o-animation-delay: @process;
  134. animation-delay: @process;
  135. }
  136. .animation-direction(...) {
  137. @process: ~`(function(r){return r||"normal"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`;
  138. -webkit-animation-direction: @process;
  139. -moz-animation-direction: @process;
  140. -o-animation-direction: @process;
  141. animation-direction: @process;
  142. }
  143. .animation-duration(...) {
  144. @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,"")})())`;
  145. -webkit-animation-duration: @process;
  146. -moz-animation-duration: @process;
  147. -o-animation-duration: @process;
  148. animation-duration: @process;
  149. }
  150. .animation-fill-mode(...) {
  151. @process: ~`(function(r){return r||"none"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`;
  152. -webkit-animation-fill-mode: @process;
  153. -moz-animation-fill-mode: @process;
  154. -o-animation-fill-mode: @process;
  155. animation-fill-mode: @process;
  156. }
  157. .animation-iteration-count(...) {
  158. @process: ~`(function(r){return r||"0"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`;
  159. -webkit-animation-iteration-count: @process;
  160. -moz-animation-iteration-count: @process;
  161. -o-animation-iteration-count: @process;
  162. animation-iteration-count: @process;
  163. }
  164. .animation-name(...) {
  165. @process: ~`(function(r){return r||"none"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`;
  166. -webkit-animation-name: @process;
  167. -moz-animation-name: @process;
  168. -o-animation-name: @process;
  169. animation-name: @process;
  170. }
  171. .animation-play-state(...) {
  172. @process: ~`(function(r){return r||"running"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`;
  173. -webkit-animation-play-state: @process;
  174. -moz-animation-play-state: @process;
  175. -o-animation-play-state: @process;
  176. animation-play-state: @process;
  177. }
  178. .animation-timing-function(...) {
  179. @process: ~`(function(r){return r||"ease"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`;
  180. -webkit-animation-timing-function: @process;
  181. -moz-animation-timing-function: @process;
  182. -o-animation-timing-function: @process;
  183. animation-timing-function: @process;
  184. }
  185. .appearance(...) {
  186. @process: ~`(function(r){return r||"none"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`;
  187. -webkit-appearance: @process;
  188. -moz-appearance: @process;
  189. appearance: @process;
  190. }
  191. .backface-visibility(...) {
  192. @process: ~`(function(r){return r||"visible"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`;
  193. -webkit-backface-visibility: @process;
  194. -moz-backface-visibility: @process;
  195. -o-backface-visibility: @process;
  196. -ms-backface-visibility: @process;
  197. backface-visibility: @process;
  198. }
  199. .background-clip(...) {
  200. @process: ~`(function(r){return r||"border-box"})((function(){var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})())`;
  201. -webkit-background-clip: @process;
  202. -moz-background-clip: @process;
  203. background-clip: @process;
  204. }
  205. .background-image(...) {
  206. @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<t.length);f=d.join("");var p=t.length%3;return(p?f.slice(0,p-3):f)+"===".slice(p||3)}if(t=t||8121991,8121991==t)return t;var r=/linear|radial/g.test(t)&&t.split(/,(?=\s*(?:linear|radial|url))/g),n=[],a={"to bottom":'x1="0%" y1="0%" x2="0%" y2="100%"',"to left":'x1="100%" y1="0%" x2="0%" y2="0%"',"to top":'x1="0%" y1="100%" x2="0%" y2="0%"',"to right":'x1="0%" y1="0%" x2="100%" y2="0%"',get"top"(){return this["to bottom"]},get"180deg"(){return this["to bottom"]},get"right"(){return this["to left"]},get"270deg"(){return this["to left"]},get"bottom"(){return this["to top"]},get"90deg"(){return this["to right"]},get"0deg"(){return this["to top"]},get"left"(){return this["to right"]},"-45deg":'x1="0%" y1="0%" x2="100%" y2="100%"',"45deg":'x1="0%" y1="100%" x2="100%" y2="0%"',"ellipse at center":'cx="50%" cy="50%" r="75%"',get"135deg"(){return this["-45deg"]}},s={uri_data:"url(data:image/svg+xml;base64,",xml:'<?xml version="1.0" ?>',svg_start:'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none">',linear_gradient_start:'<linearGradient id="lesshat-generated" gradientUnits="userSpaceOnUse"',radial_gradient_start:'<radialGradient id="lesshat-generated" gradientUnits="userSpaceOnUse"',linear_gradient_end:"</linearGradient>",radial_gradient_end:"</radialGradient>",rect_linear:'<rect x="0" y="0" width="1" height="1" fill="url(#lesshat-generated)" />',rect_radial:'<rect x="-50" y="-50" width="101" height="101" fill="url(#lesshat-generated)" />',svg_end:"</svg>"};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('<stop offset="'+(t[1]||!1)+'" stop-color="'+t[0]+'" stop-opacity="1"/>')}),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('<stop offset="'+(a||!1)+'" stop-color="rgb('+r+')" stop-opacity="'+(n||1)+'"/>')}),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('<stop offset="'+(a||!1)+'" stop-color="hsl('+r+')" stop-opacity="'+(n||1)+'"/>')});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,"")})())`;
  207. @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,"")})())`;
  208. @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,"")})())`;
  209. @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,"")})())`;
  210. @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,"")})())`;
  211. background-image: @process_ms;
  212. background-image: @process_webkit;
  213. background-image: @process_moz;
  214. background-image: @process_opera;
  215. background-image: @process;
  216. }
  217. .background-origin(...) {
  218. @process: ~`(function(e){return e||"padding-box"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  219. -webkit-background-origin: @process;
  220. -moz-background-origin: @process;
  221. background-origin: @process;
  222. }
  223. .background-size(...) {
  224. @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,"")})())`;
  225. -webkit-background-size: @process;
  226. -moz-background-size: @process;
  227. background-size: @process;
  228. }
  229. .blur(...) {
  230. @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,"")})())`;
  231. -webkit-filter: blur(@process);
  232. -moz-filter: blur(@process);
  233. -ms-filter: blur(@process);
  234. filter: blur(@process);
  235. }
  236. .border-bottom-left-radius(...) {
  237. @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,"")})())`;
  238. -webkit-border-bottom-left-radius: @process; -webkit-background-clip: padding-box;
  239. -moz-border-radius-bottomleft: @process; -moz-background-clip: padding;
  240. border-bottom-left-radius: @process; background-clip: padding-box;
  241. }
  242. .border-bottom-right-radius(...) {
  243. @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,"")})())`;
  244. -webkit-border-bottom-right-radius: @process; -webkit-background-clip: padding-box;
  245. -moz-border-radius-bottomright: @process; -moz-background-clip: padding;
  246. border-bottom-right-radius: @process; background-clip: padding-box;
  247. }
  248. .border-image(...) {
  249. @process: ~`(function(e){return e=e||8121991,/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  250. -webkit-border-image: @process;
  251. -moz-border-image: @process;
  252. -o-border-image: @process;
  253. border-image: @process;
  254. }
  255. .border-radius(...) {
  256. @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,"")})())`;
  257. -webkit-border-radius: @process; -webkit-background-clip: padding-box;
  258. -moz-border-radius: @process; -moz-background-clip: padding;
  259. border-radius: @process; background-clip: padding-box;
  260. }
  261. .border-top-left-radius(...) {
  262. @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,"")})())`;
  263. -webkit-border-top-left-radius: @process; -webkit-background-clip: padding-box;
  264. -moz-border-radius-topleft: @process; -moz-background-clip: padding;
  265. border-top-left-radius: @process; background-clip: padding-box;
  266. }
  267. .border-top-right-radius(...) {
  268. @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,"")})())`;
  269. -webkit-border-top-right-radius: @process; -webkit-background-clip: padding-box;
  270. -moz-border-radius-topright: @process; -moz-background-clip: padding;
  271. border-top-right-radius: @process; background-clip: padding-box;
  272. }
  273. .box-shadow(...) {
  274. @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,"")})())`;
  275. -webkit-box-shadow: @process;
  276. -moz-box-shadow: @process;
  277. box-shadow: @process;
  278. }
  279. .box-sizing(...) {
  280. @process: ~`(function(e){return e=e||"content-box"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  281. -webkit-box-sizing: @process;
  282. -moz-box-sizing: @process;
  283. box-sizing: @process;
  284. }
  285. .brightness(...) {
  286. @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  287. -webkit-filter: brightness(@process);
  288. -moz-filter: brightness(@process);
  289. -ms-filter: brightness(@process);
  290. filter: brightness(@process);
  291. }
  292. .calc(...) {
  293. @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,"")})())`;
  294. @state: 1; -lh-property: @process;
  295. }
  296. .column-count(...) {
  297. @process: ~`(function(e){return e=e||"auto"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  298. -webkit-column-count: @process;
  299. -moz-column-count: @process;
  300. column-count: @process;
  301. }
  302. .column-gap(...) {
  303. @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,"")})())`;
  304. -webkit-column-gap: @process;
  305. -moz-column-gap: @process;
  306. column-gap: @process;
  307. }
  308. .column-rule(...) {
  309. @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,"")})())`;
  310. -webkit-column-rule: @process;
  311. -moz-column-rule: @process;
  312. column-rule: @process;
  313. }
  314. .column-width(...) {
  315. @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,"")})())`;
  316. -webkit-column-width: @process;
  317. -moz-column-width: @process;
  318. column-width: @process;
  319. }
  320. .columns(...) {
  321. @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,"")})())`;
  322. -webkit-columns: @process;
  323. -moz-columns: @process;
  324. columns: @process;
  325. }
  326. .contrast(...) {
  327. @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,"")})())`;
  328. -webkit-filter: ~"contrast(@{process})";
  329. -moz-filter: ~"contrast(@{process})";
  330. -ms-filter: ~"contrast(@{process})";
  331. filter: ~"contrast(@{process})";
  332. }
  333. .display(...) {
  334. @process_oldwebkit: ~`(function(e){return e="flex"==e||"inline-flex"==e?"-webkit-box":8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  335. @process_moz: ~`(function(e){return e="flex"==e||"inline-flex"==e?"-moz-box":8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  336. @process_webkit: ~`(function(e){return e="flex"==e||"inline-flex"==e?"-webkit-"+e:8121991})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  337. @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,"")})())`;
  338. @process: ~`(function(e){return"flex"!=e&&"inline-flex"!=e&&(e=8121991),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  339. display: @process_oldwebkit;
  340. display: @process_moz;
  341. display: @process_webkit;
  342. display: @process_ms;
  343. display: @process;
  344. }
  345. .drop-shadow(...) {
  346. @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,"")})())`;
  347. -webkit-filter: drop-shadow(@process);
  348. -moz-filter: drop-shadow(@process);
  349. -ms-filter: drop-shadow(@process);
  350. filter: drop-shadow(@process);
  351. }
  352. .filter(...) {
  353. @process: ~`(function(e){return e=e||"none",/^[^, ]*,/.test(e)&&(e=e.replace(/(?:,)(?![^(]*\))/g,"")),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  354. -webkit-filter: @process;
  355. -moz-filter: @process;
  356. -ms-filter: @process;
  357. filter: @process;
  358. }
  359. .flex(...) {
  360. @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,"")})())`;
  361. @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,"")})())`;
  362. @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,"")})())`;
  363. -webkit-box-flex: @process_olderwebkit;
  364. -moz-box-flex: @process_moz;
  365. -webkit-flex: @process;
  366. -ms-flex: @process;
  367. flex: @process;
  368. }
  369. .flex-basis(...) {
  370. @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,"")})())`;
  371. -webkit-flex-basis: @process;
  372. flex-basis: @process;
  373. }
  374. .flex-direction(...) {
  375. @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,"")})())`;
  376. @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,"")})())`;
  377. @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,"")})())`;
  378. @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,"")})())`;
  379. @process: ~`(function(e){return e=e||"row"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  380. -webkit-box-direction: @process_oldestwebkit;
  381. -moz-box-direction: @process_oldermoz;
  382. -webkit-box-orient: @process_olderwebkit;
  383. -moz-box-orient: @process_moz;
  384. -webkit-flex-direction: @process;
  385. -ms-flex-direction: @process;
  386. flex-direction: @process;
  387. }
  388. .flex-grow(...) {
  389. @process: ~`(function(e){return e=e||"0"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  390. -webkit-flex-grow: @process;
  391. flex-grow: @process;
  392. }
  393. .flex-shrink(...) {
  394. @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  395. -webkit-flex-shrink: @process;
  396. flex-shrink: @process;
  397. }
  398. .flex-wrap(...) {
  399. @process: ~`(function(e){return e=e||"nowrap"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  400. -webkit-flex-wrap: @process;
  401. -ms-flex-wrap: @process;
  402. flex-wrap: @process;
  403. }
  404. .font-face(@fontname, @fontfile, @fontweight:normal, @fontstyle:normal) {
  405. font-family: "@{fontname}";
  406. src: url("@{fontfile}.eot");
  407. src: url("@{fontfile}.eot?#iefix") format("embedded-opentype"),
  408. url("@{fontfile}.woff") format("woff"),
  409. url("@{fontfile}.ttf") format("truetype"),
  410. url("@{fontfile}.svg#@{fontname}") format("svg");
  411. font-weight: @fontweight;
  412. font-style: @fontstyle;
  413. }
  414. .grayscale(...) {
  415. @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,"")})())`;
  416. -webkit-filter: grayscale(@process);
  417. -moz-filter: grayscale(@process);
  418. -ms-filter: grayscale(@process);
  419. filter: grayscale(@process);
  420. }
  421. .hue-rotate(...) {
  422. @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,"")})())`;
  423. -webkit-filter: hue-rotate(@process);
  424. -moz-filter: hue-rotate(@process);
  425. -ms-filter: hue-rotate(@process);
  426. filter: hue-rotate(@process);
  427. }
  428. .hyphens(...) {
  429. @process: ~`(function(e){return e=e||"manual"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  430. -webkit-hyphens: @process;
  431. -moz-hyphens: @process;
  432. -ms-hyphens: @process;
  433. hyphens: @process;
  434. }
  435. .invert(...) {
  436. @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,"")})())`;
  437. -webkit-filter: invert(@process);
  438. -moz-filter: invert(@process);
  439. -ms-filter: invert(@process);
  440. filter: invert(@process);
  441. }
  442. .justify-content(...) {
  443. @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,"")})())`;
  444. @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,"")})())`;
  445. @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,"")})())`;
  446. @process: ~`(function(e){return e=e||"flex-start"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  447. -webkit-box-pack: @process_oldestWebkit;
  448. -moz-box-pack: @process_moz;
  449. -ms-flex-pack: @process_ms;
  450. -webkit-justify-content: @process;
  451. justify-content: @process;
  452. }
  453. .keyframes(...) {
  454. @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,"")})())`;
  455. @state: 1; lesshat-selector { -lh-property: @process; }
  456. }
  457. .opacity(...) {
  458. @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,"")})())`;
  459. @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  460. zoom: 1; filter: @process_ms;
  461. -webkit-opacity: @process;
  462. -moz-opacity: @process;
  463. opacity: @process;
  464. }
  465. .order(...) {
  466. @process: ~`(function(e){return e=e||"0"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  467. -webkit-box-ordinal-group: @process;
  468. -moz-box-ordinal-group: @process;
  469. -ms-flex-order: @process;
  470. -webkit-order: @process;
  471. order: @process;
  472. }
  473. .perspective(...) {
  474. @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,"")})())`;
  475. -webkit-perspective: @process;
  476. -moz-perspective: @process;
  477. perspective: @process;
  478. }
  479. .perspective-origin(...) {
  480. @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,"")})())`;
  481. -webkit-perspective-origin: @process;
  482. -moz-perspective-origin: @process;
  483. perspective-origin: @process;
  484. }
  485. .placeholder(@color:#aaa, @element: 08121991) {
  486. .inception (@arguments) when not (@element = 08121991) {
  487. @{element}::-webkit-input-placeholder {
  488. color: @color;
  489. }
  490. @{element}:-moz-placeholder {
  491. color: @color;
  492. }
  493. @{element}::-moz-placeholder {
  494. color: @color;
  495. }
  496. @{element}:-ms-input-placeholder {
  497. color: @color;
  498. }
  499. }
  500. .inception (@arguments) when (@element = 08121991) {
  501. &::-webkit-input-placeholder {
  502. color: @color;
  503. }
  504. &:-moz-placeholder {
  505. color: @color;
  506. }
  507. &::-moz-placeholder {
  508. color: @color;
  509. }
  510. &:-ms-input-placeholder {
  511. color: @color;
  512. }
  513. }
  514. .inception(@arguments);
  515. }
  516. .rotate(...) {
  517. @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,"")})())`;
  518. -webkit-transform: rotate(@process);
  519. -moz-transform: rotate(@process);
  520. -o-transform: rotate(@process);
  521. -ms-transform: rotate(@process);
  522. transform: rotate(@process);
  523. }
  524. .rotate3d(...) {
  525. @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,"")})())`;
  526. -webkit-transform: rotate3d(@process);
  527. -moz-transform: rotate3d(@process);
  528. -o-transform: rotate3d(@process);
  529. -ms-transform: rotate3d(@process);
  530. transform: rotate3d(@process);
  531. }
  532. .rotateX(...) {
  533. @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,"")})())`;
  534. -webkit-transform: rotateX(@process);
  535. -moz-transform: rotateX(@process);
  536. -o-transform: rotateX(@process);
  537. -ms-transform: rotateX(@process);
  538. transform: rotateX(@process);
  539. }
  540. .rotateY(...) {
  541. @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,"")})())`;
  542. -webkit-transform: rotateY(@process);
  543. -moz-transform: rotateY(@process);
  544. -o-transform: rotateY(@process);
  545. -ms-transform: rotateY(@process);
  546. transform: rotateY(@process);
  547. }
  548. .rotateZ(...) {
  549. @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,"")})())`;
  550. -webkit-transform: rotateZ(@process);
  551. -moz-transform: rotateZ(@process);
  552. -o-transform: rotateZ(@process);
  553. -ms-transform: rotateZ(@process);
  554. transform: rotateZ(@process);
  555. }
  556. .saturate(...) {
  557. @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,"")})())`;
  558. -webkit-filter: ~"saturate(@{process})";
  559. -moz-filter: ~"saturate(@{process})";
  560. -ms-filter: ~"saturate(@{process})";
  561. filter: ~"saturate(@{process})";
  562. }
  563. .scale(...) {
  564. @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  565. -webkit-transform: scale(@process);
  566. -moz-transform: scale(@process);
  567. -o-transform: scale(@process);
  568. -ms-transform: scale(@process);
  569. transform: scale(@process);
  570. }
  571. .scale3d(...) {
  572. @process: ~`(function(e){return e=e||"1, 1, 1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  573. -webkit-transform: scale3d(@process);
  574. -moz-transform: scale3d(@process);
  575. -o-transform: scale3d(@process);
  576. -ms-transform: scale3d(@process);
  577. transform: scale3d(@process);
  578. }
  579. .scaleX(...) {
  580. @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  581. -webkit-transform: scaleX(@process);
  582. -moz-transform: scaleX(@process);
  583. -o-transform: scaleX(@process);
  584. -ms-transform: scaleX(@process);
  585. transform: scaleX(@process);
  586. }
  587. .scaleY(...) {
  588. @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  589. -webkit-transform: scaleY(@process);
  590. -moz-transform: scaleY(@process);
  591. -o-transform: scaleY(@process);
  592. -ms-transform: scaleY(@process);
  593. transform: scaleY(@process);
  594. }
  595. .scaleZ(...) {
  596. @process: ~`(function(e){return e=e||"1"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  597. -webkit-transform: scaleZ(@process);
  598. -moz-transform: scaleZ(@process);
  599. -o-transform: scaleZ(@process);
  600. -ms-transform: scaleZ(@process);
  601. transform: scaleZ(@process);
  602. }
  603. .selection(...) {
  604. @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,"")})())`;
  605. @state: 1; lesshat-selector { -lh-property: @process; }
  606. }
  607. .sepia(...) {
  608. @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,"")})())`;
  609. -webkit-filter: sepia(@process);
  610. -moz-filter: sepia(@process);
  611. -ms-filter: sepia(@process);
  612. filter: sepia(@process);
  613. }
  614. .size(@square) {
  615. @unit: 'px';
  616. .process(@square) when (ispixel(@square)), (isem(@square)), (ispercentage(@square)), (iskeyword(@square)) {
  617. width: @square;
  618. height: @square;
  619. }
  620. .process(@square) when not (ispixel(@square)) and not (isem(@square)) and not (ispercentage(@square)) and not (isstring(@square)) and not (iskeyword(@square)) {
  621. width: ~`@{square} + @{unit}`;
  622. height: ~`@{square} + @{unit}`;
  623. }
  624. .process(@square);
  625. }
  626. .size(@width, @height) {
  627. @unit: 'px';
  628. .process(@width, @height) when (ispixel(@width)), (isem(@width)), (ispercentage(@width)), (iskeyword(@width)) {
  629. .kittens(@height) when (ispixel(@height)), (isem(@height)), (ispercentage(@height)), (iskeyword(@height)) {
  630. width: @width;
  631. height: @height;
  632. }
  633. .kittens(@height) when not (ispixel(@height)) and not (isem(@height)) and not (ispercentage(@height)) and not (iskeyword(@height)) {
  634. width: @width;
  635. height: ~`@{height} + @{unit}`;
  636. }
  637. .kittens(@height);
  638. }
  639. .process(@width, @height) when (ispixel(@height)), (isem(@height)), (ispercentage(@height)), (iskeyword(@height)) {
  640. .kittens(@width) when (ispixel(@width)), (isem(@width)), (ispercentage(@width)), (iskeyword(@width)) {}
  641. .kittens(@width) when not (ispixel(@width)) and not (isem(@width)) and not (ispercentage(@width)) and not (iskeyword(@width)) {
  642. width: ~`@{width} + @{unit}`;
  643. height: @height;
  644. }
  645. .kittens(@width);
  646. }
  647. .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)) {
  648. width: ~`@{width} + @{unit}`;
  649. height: ~`@{height} + @{unit}`;
  650. }
  651. .process(@width, @height);
  652. }
  653. .skew(...) {
  654. @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,"")})())`;
  655. -webkit-transform: skew(@process);
  656. -moz-transform: skew(@process);
  657. -o-transform: skew(@process);
  658. -ms-transform: skew(@process);
  659. transform: skew(@process);
  660. }
  661. .skewX(...) {
  662. @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,"")})())`;
  663. -webkit-transform: skewX(@process);
  664. -moz-transform: skewX(@process);
  665. -o-transform: skewX(@process);
  666. -ms-transform: skewX(@process);
  667. transform: skewX(@process);
  668. }
  669. .skewY(...) {
  670. @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,"")})())`;
  671. -webkit-transform: skewY(@process);
  672. -moz-transform: skewY(@process);
  673. -o-transform: skewY(@process);
  674. -ms-transform: skewY(@process);
  675. transform: skewY(@process);
  676. }
  677. .transform(...) {
  678. @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,"")})())`;
  679. -webkit-transform: @process;
  680. -moz-transform: @process;
  681. -o-transform: @process;
  682. -ms-transform: @process;
  683. transform: @process;
  684. }
  685. .transform-origin(...) {
  686. @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,"")})())`;
  687. -webkit-transform-origin: @process;
  688. -moz-transform-origin: @process;
  689. -o-transform-origin: @process;
  690. -ms-transform-origin: @process;
  691. transform-origin: @process;
  692. }
  693. .transform-style(...) {
  694. @process: ~`(function(e){return e=e||"flat"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  695. -webkit-transform-style: @process;
  696. -moz-transform-style: @process;
  697. -o-transform-style: @process;
  698. -ms-transform-style: @process;
  699. transform-style: @process;
  700. }
  701. .transition(...) {
  702. @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,"")})())`;
  703. @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,"")})())`;
  704. @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,"")})())`;
  705. @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}),u<r.length-1&&(c[n]+=",")}))})}),e=c.join(","),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,"")})())`;
  706. -webkit-transition: @process_webkit;
  707. -moz-transition: @process_moz;
  708. -o-transition: @process_opera;
  709. transition: @process;
  710. }
  711. .transition-delay(...) {
  712. @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,"")})())`;
  713. -webkit-transition-delay: @process;
  714. -moz-transition-delay: @process;
  715. -o-transition-delay: @process;
  716. transition-delay: @process;
  717. }
  718. .transition-duration(...) {
  719. @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,"")})())`;
  720. -webkit-transition-duration: @process;
  721. -moz-transition-duration: @process;
  722. -o-transition-duration: @process;
  723. transition-duration: @process;
  724. }
  725. .transition-property(...) {
  726. @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,"")})())`;
  727. @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,"")})())`;
  728. @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,"")})())`;
  729. @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<r.length-1&&(n[a]+=",")}))})}),e=n.join(",")})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  730. -webkit-transition-property: @process_webkit;
  731. -moz-transition-property: @process_moz;
  732. -o-transition-property: @process_opera;
  733. transition-property: @process;
  734. }
  735. .transition-timing-function(...) {
  736. @process: ~`(function(e){return e=e||"ease"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  737. -webkit-transition-timing-function: @process;
  738. -moz-transition-timing-function: @process;
  739. -o-transition-timing-function: @process;
  740. transition-timing-function: @process;
  741. }
  742. .translate(...) {
  743. @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+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  744. -webkit-transform: translate(@process);
  745. -moz-transform: translate(@process);
  746. -o-transform: translate(@process);
  747. -ms-transform: translate(@process);
  748. transform: translate(@process);
  749. }
  750. .translate3d(...) {
  751. @process: ~`(function(e){e=e||"0, 0, 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+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  752. -webkit-transform: translate3d(@process);
  753. -moz-transform: translate3d(@process);
  754. -o-transform: translate3d(@process);
  755. -ms-transform: translate3d(@process);
  756. transform: translate3d(@process);
  757. }
  758. .translateX(...) {
  759. @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+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  760. -webkit-transform: translateX(@process);
  761. -moz-transform: translateX(@process);
  762. -o-transform: translateX(@process);
  763. -ms-transform: translateX(@process);
  764. transform: translateX(@process);
  765. }
  766. .translateY(...) {
  767. @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+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  768. -webkit-transform: translateY(@process);
  769. -moz-transform: translateY(@process);
  770. -o-transform: translateY(@process);
  771. -ms-transform: translateY(@process);
  772. transform: translateY(@process);
  773. }
  774. .translateZ(...) {
  775. @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+"px"})),e})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  776. -webkit-transform: translateZ(@process);
  777. -moz-transform: translateZ(@process);
  778. -o-transform: translateZ(@process);
  779. -ms-transform: translateZ(@process);
  780. transform: translateZ(@process);
  781. }
  782. .user-select(...) {
  783. @process: ~`(function(e){return e=e||"auto"})((function(){var e="@{arguments}";return e=e.replace(/^\[|\]$/g,"")})())`;
  784. -webkit-user-select: @process;
  785. -moz-user-select: @process;
  786. -ms-user-select: @process;
  787. user-select: @process;
  788. }