Permalink
Browse files

added support for + operator for calc functions

  • Loading branch information...
1 parent 1845473 commit e0be226e9fb7bf472fef55f8d7a6c403672048a8 Merrifield, Jay committed with Oct 12, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/css/Parser.js
  2. +1 −1 tests/css/Validation.js
View
@@ -712,14 +712,14 @@ Parser.prototype = function(){
/*
* operator
- * : '/' S* | ',' S* | '*' S* | '-' S* /( empty )/
+ * : '/' S* | ',' S* | '+' S* | '*' S* | '-' S* /( empty )/
* ;
*/
var tokenStream = this._tokenStream,
token = null;
- if (tokenStream.match([Tokens.SLASH, Tokens.COMMA, Tokens.STAR, Tokens.MINUS])){
+ if (tokenStream.match([Tokens.SLASH, Tokens.COMMA, Tokens.PLUS, Tokens.STAR, Tokens.MINUS])){
token = tokenStream.token();
this._readWhitespace();
}
View
@@ -493,7 +493,7 @@
"1px",
"1%",
"calc(100% - 5px)",
- "calc(100% - 1em)",
+ "calc(100% + 1em)",
"calc(100%/6)",
"calc(10%*6)",
"inherit"

0 comments on commit e0be226

Please sign in to comment.