Unverified Commit e6d7d76b authored by mrbean-bremen's avatar mrbean-bremen
Browse files

Allow empty value for style property

- conforms to CSS specs - use default value if value is empty
- fixes #318
parent 32e70005
......@@ -342,8 +342,10 @@ namespace Svg.ExCSS
switch (token.GrammarSegment)
{
case GrammarSegment.Semicolon:
// the value is empty - remove the property to use the default value
RemoveCurrentProperty();
SetParsingContext(ParsingContext.InDeclaration);
break;
return true;
case GrammarSegment.CurlyBracketClose:
ParseDeclaration(token);
......
......@@ -223,6 +223,20 @@ namespace Svg.ExCSS
}
}
private void RemoveCurrentProperty()
{
if (_property != null)
{
var rule = CurrentRule as ISupportsDeclarations;
if (rule != null)
{
rule.Declarations.Remove(_property);
}
_property = null;
}
}
private T CastRuleSet<T>() where T : RuleSet
{
if (_activeRuleSets.Count > 0)
......
......@@ -188,6 +188,7 @@ __issue-227-02
__issue-239-01
__issue-242-01
__issue-279-01
__issue-318-01
__issue-323-02
__issue-323-03
__issue-329-01
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment