@@ -80,13 +80,14 @@ public CssMargin(ApplContext ac, CssExpression expression,
8080 v .add (val );
8181 break ;
8282 case CssTypes .CSS_IDENT :
83- if (inherit .equals (val )) {
84- v .add (inherit );
83+ CssIdent id = val .getIdent ();
84+ if (CssIdent .isCssWide (id )) {
85+ v .add (val );
8586 gotInherit = true ;
8687 break ;
8788 }
88- if (auto .equals (val )) {
89- v .add (auto );
89+ if (auto .equals (id )) {
90+ v .add (val );
9091 break ;
9192 }
9293 // if not inherit, or not an ident
@@ -113,11 +114,11 @@ public CssMargin(ApplContext ac, CssExpression expression,
113114 if (v .size () > 1 ) {
114115 throw new InvalidParamException ("unrecognize" , ac );
115116 }
116- value = inherit ;
117- marginBottom .value = inherit ;
118- marginTop .value = inherit ;
119- marginLeft .value = inherit ;
120- marginRight .value = inherit ;
117+ value = v . get ( 0 ) ;
118+ marginBottom .value = value ;
119+ marginTop .value = value ;
120+ marginLeft .value = value ;
121+ marginRight .value = value ;
121122 } else {
122123 switch (v .size ()) {
123124 case 1 :
@@ -174,13 +175,14 @@ protected static CssValue parseMargin(ApplContext ac,
174175 expression .next ();
175176 return val ;
176177 case CssTypes .CSS_IDENT :
177- if (inherit .equals (val )) {
178+ CssIdent id = val .getIdent ();
179+ if (CssIdent .isCssWide (id )) {
178180 expression .next ();
179- return inherit ;
181+ return val ;
180182 }
181- if (auto .equals (val )) {
183+ if (auto .equals (id )) {
182184 expression .next ();
183- return auto ;
185+ return val ;
184186 }
185187 // if not inherit, or not an ident
186188 // let it flow to the exception
0 commit comments