Skip to content

How Parse css style fill rule?  #59

@StefanoBalzarottiEnnova

Description

I have this CSS:

var css = @"
	.st0{fill:#AFAA96;stroke:#AFAA96;stroke-miterlimit:10;}
	.st1{fill:none;stroke:#738282;stroke-width:32;stroke-miterlimit:10;}
	.st2{display:none;fill:none;stroke:#738282;stroke-width:32;stroke-miterlimit:10;}
	.st3{display:none;fill:none;stroke:#FAFAFA;stroke-width:32;stroke-miterlimit:10;}"

I try to parse with:

CssParser cssParser = new CssParser();
                    var style = cssParser.ParseStyleSheet(css);
 foreach (ICssStyleRule rule in style.Rules)
 {
    Console.WriteLine(rule.CssText);
 }

The output is:

//.st0 { stroke: rgba(175, 170, 150, 1); stroke-miterlimit: 10 }
//.st1 { stroke: rgba(115, 130, 130, 1); stroke-width: 32; stroke-miterlimit: 10 }
//.st2 { display: none; stroke: rgba(115, 130, 130, 1); stroke-width: 32; stroke-miterlimit: 10 }
//.st3 { display: none; stroke: rgba(250, 250, 250, 1); stroke-width: 32; stroke-miterlimit: 10 }

What happened to fill rule?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions