Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
e6d7d76b
Unverified
Commit
e6d7d76b
authored
Feb 10, 2019
by
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Source/External/ExCSS/Parser.Blocks.cs
View file @
e6d7d76b
...
...
@@ -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
);
b
re
ak
;
re
turn
true
;
case
GrammarSegment
.
CurlyBracketClose
:
ParseDeclaration
(
token
);
...
...
Source/External/ExCSS/Parser.cs
View file @
e6d7d76b
...
...
@@ -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
)
...
...
Tests/Svg.UnitTests/PassingTests.csv
View file @
e6d7d76b
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment