Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rename is-* functions to is*

  • Loading branch information...
commit e69433b8d173843c47640ce4bdb3300bf52aec83 1 parent 6683335
@cloudhead cloudhead authored
Showing with 17 additions and 17 deletions.
  1. +8 −8 lib/less/functions.js
  2. +9 −9 test/less/functions.less
View
16 lib/less/functions.js
@@ -175,28 +175,28 @@ tree.functions = {
throw { type: "Argument", message: "argument must be a string" };
}
},
- 'is-color': function (n) {
+ iscolor: function (n) {
return this._isa(n, tree.Color);
},
- 'is-number': function (n) {
+ isnumber: function (n) {
return this._isa(n, tree.Dimension);
},
- 'is-string': function (n) {
+ isstring: function (n) {
return this._isa(n, tree.Quoted);
},
- 'is-keyword': function (n) {
+ iskeyword: function (n) {
return this._isa(n, tree.Keyword);
},
- 'is-url': function (n) {
+ isurl: function (n) {
return this._isa(n, tree.URL);
},
- 'is-pixel': function (n) {
+ ispixel: function (n) {
return (n instanceof tree.Dimension) && n.unit === 'px' ? tree.True : tree.False;
},
- 'is-percentage': function (n) {
+ ispercentage: function (n) {
return (n instanceof tree.Dimension) && n.unit === '%' ? tree.True : tree.False;
},
- 'is-em': function (n) {
+ isem: function (n) {
return (n instanceof tree.Dimension) && n.unit === 'em' ? tree.True : tree.False;
},
_isa: function (n, Type) {
View
18 test/less/functions.less
@@ -32,15 +32,15 @@
color: color("#ff0011");
.is-a {
- color: is-color(#ddd);
- color: is-color(red);
- color: is-color(rgb(0, 0, 0));
- keyword: is-keyword(hello);
- number: is-number(32);
- string: is-string("hello");
- pixel: is-pixel(32px);
- percent: is-percentage(32%);
- em: is-em(32em);
+ color: iscolor(#ddd);
+ color: iscolor(red);
+ color: iscolor(rgb(0, 0, 0));
+ keyword: iskeyword(hello);
+ number: isnumber(32);
+ string: isstring("hello");
+ pixel: ispixel(32px);
+ percent: ispercentage(32%);
+ em: isem(32em);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.