Skip to content

Commit 85fbf54

Browse files
author
Aaron Leung
committed
Merge branch 'utkarshkukreti-recognize-moz-and-webkit-calc-kwd'
2 parents a285128 + 15a6cd1 commit 85fbf54

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

constants.cpp

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,22 @@ namespace Sass {
5454
extern const char vendor_khtml_kwd[] = "-khtml-";
5555

5656
// css functions and keywords
57-
extern const char charset_kwd[] = "@charset";
58-
extern const char media_kwd[] = "@media";
59-
extern const char keyframes_kwd[] = "keyframes";
60-
extern const char only_kwd[] = "only";
61-
extern const char rgb_kwd[] = "rgb(";
62-
extern const char url_kwd[] = "url(";
63-
extern const char image_url_kwd[] = "image-url(";
64-
extern const char important_kwd[] = "important";
65-
extern const char pseudo_not_kwd[] = ":not(";
66-
extern const char even_kwd[] = "even";
67-
extern const char odd_kwd[] = "odd";
68-
extern const char progid_kwd[] = "progid";
69-
extern const char expression_kwd[] = "expression";
70-
extern const char calc_kwd[] = "calc(";
57+
extern const char charset_kwd[] = "@charset";
58+
extern const char media_kwd[] = "@media";
59+
extern const char keyframes_kwd[] = "keyframes";
60+
extern const char only_kwd[] = "only";
61+
extern const char rgb_kwd[] = "rgb(";
62+
extern const char url_kwd[] = "url(";
63+
extern const char image_url_kwd[] = "image-url(";
64+
extern const char important_kwd[] = "important";
65+
extern const char pseudo_not_kwd[] = ":not(";
66+
extern const char even_kwd[] = "even";
67+
extern const char odd_kwd[] = "odd";
68+
extern const char progid_kwd[] = "progid";
69+
extern const char expression_kwd[] = "expression";
70+
extern const char calc_kwd[] = "calc(";
71+
extern const char moz_calc_kwd[] = "-moz-calc(";
72+
extern const char webkit_calc_kwd[] = "-webkit-calc(";
7173

7274
// css attribute-matching operators
7375
extern const char tilde_equal[] = "~=";

constants.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ namespace Sass {
6868
extern const char progid_kwd[];
6969
extern const char expression_kwd[];
7070
extern const char calc_kwd[];
71+
extern const char moz_calc_kwd[];
72+
extern const char webkit_calc_kwd[];
7173

7274
// css attribute-matching operators
7375
extern const char tilde_equal[];

parser.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,9 @@ namespace Sass {
916916
}
917917
return kwd_arg;
918918
}
919-
else if (peek< exactly<calc_kwd> >()) {
919+
else if (peek< exactly< calc_kwd > >() ||
920+
peek< exactly< moz_calc_kwd > >() ||
921+
peek< exactly< webkit_calc_kwd > >()) {
920922
return parse_calc_function();
921923
}
922924
else if (peek< functional_schema >()) {

0 commit comments

Comments
 (0)