Skip to content

Commit

Permalink
Version 2.0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Brzek committed Dec 13, 2013
1 parent d14e4e4 commit cc2e62f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ README.md file is automatically generated.
**[Documentation](#documentation) |**

---
### Current version: v2.0.12 (2013-12-11)
### Current version: v2.0.13 (2013-12-13)
## Intro
Why LESS Hat? In August 2012, while we were developing and extending [CSS Hat](www.csshat.com) for LESS we needed universal mixins. Unfortunately, none of available were good enough that would satisfy our needs and that’s why we created new custom ones on our own, which have become the most popular mixin library for the whole LESS CSS.

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "lesshat",
"version": "2.0.12",
"version": "2.0.13",
"main": "./build/lesshat.less"
}
4 changes: 2 additions & 2 deletions build/lesshat-prefixed.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Handcrafted by Petr Brzek, lesshat.com
// Works great with CSS Hat csshat.com

// version: v2.0.12 (2013-12-11)
// version: v2.0.13 (2013-12-13)

// TABLE OF MIXINS:
// align-content
Expand Down Expand Up @@ -1499,7 +1499,7 @@
@opera_local: true;
@w3c_local: true;

@process: ~`(function(value){function syntax(start,selector,prefix){var end="}\n",definition=value_temp.split(/(^[a-zA-Z0-9-]+),/g),keyframes=selector+" "+definition[1]+"{",prefixes=["-webkit-","-moz-","-ms-",""];prefix?prefixedProperties.forEach(function(property){-1!==value.indexOf(property)&&(definition[2]=definition[2].replace(new RegExp(property,"g"),function(match){return prefix+match}))}):definition[2]=definition[2].replace(/{([^}]+)}/g,function(match,sub){var subSplit=sub.split(";");subSplit.forEach(function(css,index){prefixedProperties.forEach(function(property){-1!==css.indexOf(property)&&(subSplit[index]="",prefixes.forEach(function(vendor){subSplit[index]+=css.trim().replace(new RegExp(property,"g"),function(match){return vendor+match})+";"}))})});var temp=subSplit.join("");return match.replace(sub,temp)}),keyframes+=definition[2]+end,"start"==start?value="0; } \n"+keyframes:"startend"==start?value="0; } \n"+keyframes.replace(end,""):value+="end"==start?keyframes.replace(end,""):keyframes}value=value||8121991;var state="@{state}",value_temp=value;if(8121991==value)return value;var prefixedProperties=["animation","transform","filter"];switch(state){case"1":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-moz-keyframes","-moz-"),syntax(null,"@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"2":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-moz-keyframes","-moz-"),syntax("end","@keyframes");break;case"3":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-moz-keyframes","-moz-"),syntax("end","@-o-keyframes","-o-");break;case"4":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"5":syntax("start","@-webkit-keyframes","-webkit-"),syntax("end","@-moz-keyframes","-moz-");break;case"6":syntax("start","@-webkit-keyframes","-webkit-"),syntax("end","@-o-keyframes","-o-");break;case"7":syntax("start","@-webkit-keyframes","-webkit-"),syntax("end","@keyframes");break;case"8":syntax("startend","@-webkit-keyframes","-webkit-");break;case"9":syntax("start","@-moz-keyframes","-moz-"),syntax(null,"@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"10":syntax("start","@-moz-keyframes","-moz-"),syntax("end","@-o-keyframes","-o-");break;case"11":syntax("start","@-moz-keyframes","-moz-"),syntax("end","@keyframes");break;case"12":syntax("startend","@-moz-keyframes","-moz-");break;case"13":syntax("start","@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"14":syntax("startend","@-o-keyframes","-o-");break;case"15":syntax("startend","@keyframes")}return value})((function(){var args="@{arguments}";return args=args.replace(/^\[|\]$/g,"")})())`;
@process: ~`(function(value){function syntax(start,selector,prefix){var end="}\n",definition=value_temp.split(/(^[a-zA-Z0-9-]+),/g),keyframes=selector+" "+definition[1]+"{",prefixes=["-webkit-","-moz-","-ms-",""];prefix?prefixedProperties.forEach(function(property){-1!==value.indexOf(property)&&(definition[2]=definition[2].replace(new RegExp(property,"g"),function(match){return prefix+match}))}):definition[2]=definition[2].replace(/{([^}]+)}/g,function(match,sub){var subSplit=sub.split(";");subSplit.forEach(function(css,index){prefixedProperties.forEach(function(property){-1!==css.indexOf(property)&&(subSplit[index]="",prefixes.forEach(function(vendor){subSplit[index]+=css.trim().replace(new RegExp(property,"g"),function(match){return vendor+match})+";"}))})});var temp=subSplit.join(";").replace(/;;/g,";");return match.replace(sub,temp)}),keyframes+=definition[2]+end,"start"==start?value="0; } \n"+keyframes:"startend"==start?value="0; } \n"+keyframes.replace(end,""):value+="end"==start?keyframes.replace(end,""):keyframes}value=value||8121991;var state="@{state}",value_temp=value;if(8121991==value)return value;var prefixedProperties=["animation","transform","filter"];switch(state){case"1":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-moz-keyframes","-moz-"),syntax(null,"@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"2":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-moz-keyframes","-moz-"),syntax("end","@keyframes");break;case"3":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-moz-keyframes","-moz-"),syntax("end","@-o-keyframes","-o-");break;case"4":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"5":syntax("start","@-webkit-keyframes","-webkit-"),syntax("end","@-moz-keyframes","-moz-");break;case"6":syntax("start","@-webkit-keyframes","-webkit-"),syntax("end","@-o-keyframes","-o-");break;case"7":syntax("start","@-webkit-keyframes","-webkit-"),syntax("end","@keyframes");break;case"8":syntax("startend","@-webkit-keyframes","-webkit-");break;case"9":syntax("start","@-moz-keyframes","-moz-"),syntax(null,"@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"10":syntax("start","@-moz-keyframes","-moz-"),syntax("end","@-o-keyframes","-o-");break;case"11":syntax("start","@-moz-keyframes","-moz-"),syntax("end","@keyframes");break;case"12":syntax("startend","@-moz-keyframes","-moz-");break;case"13":syntax("start","@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"14":syntax("startend","@-o-keyframes","-o-");break;case"15":syntax("startend","@keyframes")}return value})((function(){var args="@{arguments}";return args=args.replace(/^\[|\]$/g,"")})())`;

@state: 1; // Default state 1 means all prefixes

Expand Down
4 changes: 2 additions & 2 deletions build/lesshat.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Handcrafted by Petr Brzek, lesshat.com
// Works great with CSS Hat csshat.com

// version: v2.0.12 (2013-12-11)
// version: v2.0.13 (2013-12-13)

// TABLE OF MIXINS:
// align-content
Expand Down Expand Up @@ -1499,7 +1499,7 @@
@opera_local: true;
@w3c_local: true;

@process: ~`(function(value){function syntax(start,selector,prefix){var end="}\n",definition=value_temp.split(/(^[a-zA-Z0-9-]+),/g),keyframes=selector+" "+definition[1]+"{",prefixes=["-webkit-","-moz-","-ms-",""];prefix?prefixedProperties.forEach(function(property){-1!==value.indexOf(property)&&(definition[2]=definition[2].replace(new RegExp(property,"g"),function(match){return prefix+match}))}):definition[2]=definition[2].replace(/{([^}]+)}/g,function(match,sub){var subSplit=sub.split(";");subSplit.forEach(function(css,index){prefixedProperties.forEach(function(property){-1!==css.indexOf(property)&&(subSplit[index]="",prefixes.forEach(function(vendor){subSplit[index]+=css.trim().replace(new RegExp(property,"g"),function(match){return vendor+match})+";"}))})});var temp=subSplit.join("");return match.replace(sub,temp)}),keyframes+=definition[2]+end,"start"==start?value="0; } \n"+keyframes:"startend"==start?value="0; } \n"+keyframes.replace(end,""):value+="end"==start?keyframes.replace(end,""):keyframes}value=value||8121991;var state="@{state}",value_temp=value;if(8121991==value)return value;var prefixedProperties=["animation","transform","filter"];switch(state){case"1":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-moz-keyframes","-moz-"),syntax(null,"@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"2":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-moz-keyframes","-moz-"),syntax("end","@keyframes");break;case"3":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-moz-keyframes","-moz-"),syntax("end","@-o-keyframes","-o-");break;case"4":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"5":syntax("start","@-webkit-keyframes","-webkit-"),syntax("end","@-moz-keyframes","-moz-");break;case"6":syntax("start","@-webkit-keyframes","-webkit-"),syntax("end","@-o-keyframes","-o-");break;case"7":syntax("start","@-webkit-keyframes","-webkit-"),syntax("end","@keyframes");break;case"8":syntax("startend","@-webkit-keyframes","-webkit-");break;case"9":syntax("start","@-moz-keyframes","-moz-"),syntax(null,"@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"10":syntax("start","@-moz-keyframes","-moz-"),syntax("end","@-o-keyframes","-o-");break;case"11":syntax("start","@-moz-keyframes","-moz-"),syntax("end","@keyframes");break;case"12":syntax("startend","@-moz-keyframes","-moz-");break;case"13":syntax("start","@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"14":syntax("startend","@-o-keyframes","-o-");break;case"15":syntax("startend","@keyframes")}return value})((function(){var args="@{arguments}";return args=args.replace(/^\[|\]$/g,"")})())`;
@process: ~`(function(value){function syntax(start,selector,prefix){var end="}\n",definition=value_temp.split(/(^[a-zA-Z0-9-]+),/g),keyframes=selector+" "+definition[1]+"{",prefixes=["-webkit-","-moz-","-ms-",""];prefix?prefixedProperties.forEach(function(property){-1!==value.indexOf(property)&&(definition[2]=definition[2].replace(new RegExp(property,"g"),function(match){return prefix+match}))}):definition[2]=definition[2].replace(/{([^}]+)}/g,function(match,sub){var subSplit=sub.split(";");subSplit.forEach(function(css,index){prefixedProperties.forEach(function(property){-1!==css.indexOf(property)&&(subSplit[index]="",prefixes.forEach(function(vendor){subSplit[index]+=css.trim().replace(new RegExp(property,"g"),function(match){return vendor+match})+";"}))})});var temp=subSplit.join(";").replace(/;;/g,";");return match.replace(sub,temp)}),keyframes+=definition[2]+end,"start"==start?value="0; } \n"+keyframes:"startend"==start?value="0; } \n"+keyframes.replace(end,""):value+="end"==start?keyframes.replace(end,""):keyframes}value=value||8121991;var state="@{state}",value_temp=value;if(8121991==value)return value;var prefixedProperties=["animation","transform","filter"];switch(state){case"1":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-moz-keyframes","-moz-"),syntax(null,"@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"2":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-moz-keyframes","-moz-"),syntax("end","@keyframes");break;case"3":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-moz-keyframes","-moz-"),syntax("end","@-o-keyframes","-o-");break;case"4":syntax("start","@-webkit-keyframes","-webkit-"),syntax(null,"@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"5":syntax("start","@-webkit-keyframes","-webkit-"),syntax("end","@-moz-keyframes","-moz-");break;case"6":syntax("start","@-webkit-keyframes","-webkit-"),syntax("end","@-o-keyframes","-o-");break;case"7":syntax("start","@-webkit-keyframes","-webkit-"),syntax("end","@keyframes");break;case"8":syntax("startend","@-webkit-keyframes","-webkit-");break;case"9":syntax("start","@-moz-keyframes","-moz-"),syntax(null,"@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"10":syntax("start","@-moz-keyframes","-moz-"),syntax("end","@-o-keyframes","-o-");break;case"11":syntax("start","@-moz-keyframes","-moz-"),syntax("end","@keyframes");break;case"12":syntax("startend","@-moz-keyframes","-moz-");break;case"13":syntax("start","@-o-keyframes","-o-"),syntax("end","@keyframes");break;case"14":syntax("startend","@-o-keyframes","-o-");break;case"15":syntax("startend","@keyframes")}return value})((function(){var args="@{arguments}";return args=args.replace(/^\[|\]$/g,"")})())`;

@state: 1; // Default state 1 means all prefixes

Expand Down
2 changes: 1 addition & 1 deletion mixins/keyframes/keyframes.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ var keyframes = function keyframes(value) {
});
});

var temp = subSplit.join('');
var temp = subSplit.join(';').replace(/;;/g, ';');
return match.replace(sub, temp);
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lesshat",
"description": "Most advanced LESS CSS mixins library",
"version": "2.0.12",
"version": "2.0.13",
"homepage": "http://lesshat.com/",
"author": {
"name": "Petr Brzek",
Expand Down

0 comments on commit cc2e62f

Please sign in to comment.