Skip to content

Commit

Permalink
Merge pull request #890 from Harrison/vmin-unit-dimension
Browse files Browse the repository at this point in the history
Add vmin unit to parser dimensions
  • Loading branch information
Synchro committed Aug 10, 2012
2 parents be74f9a + 6cc1458 commit 24fbbc1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/less/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ less.Parser = function Parser(env) {
var value, c = input.charCodeAt(i);
if ((c > 57 || c < 45) || c === 47) return;

if (value = $(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn|dpi|rem|vw|vh|vm|ch)?/)) {
if (value = $(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn|dpi|rem|vw|vh|vm|vmin|ch)?/)) {
return new(tree.Dimension)(value[1], value[2]);
}
},
Expand Down
1 change: 1 addition & 0 deletions test/css/css-3.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ p::before {
font: 8vw/9vw;
font: 10vh/12vh;
font: 12vm/15vm;
font: 12vmin/15vmin;
font: 1.2ch/1.5ch;
}
@supports ( box-shadow: 2px 2px 2px black ) or
Expand Down
1 change: 1 addition & 0 deletions test/less/css-3.less
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ p::before {
font: 8vw/9vw;
font: 10vh/12vh;
font: 12vm/15vm;
font: 12vmin/15vmin;
font: 1.2ch/1.5ch;
}

Expand Down

0 comments on commit 24fbbc1

Please sign in to comment.