AngleSharp / AngleSharp.Css

:angel: Library to enable support for cascading stylesheets in AngleSharp.
https://anglesharp.github.io
MIT License
72 stars 34 forks source link

linear-gradients are not written to css with angles #45

Closed Fraaankes closed 4 years ago

Fraaankes commented 4 years ago

Bug Report

Prerequisites

For more information, see the CONTRIBUTING guide.

Description

Parsing a style rule with a linear-gradient, and then writing the same rule back to css causes the angle to get removed.

Steps to Reproduce

class Program
    {
        static void Main(string[] args)
        {
            var parser = new CssParser();
            var styleSheet = parser.ParseStyleSheet(".bg { background-image: linear-gradient(to right, #FF866E 0, #F15A24 0); }");
            var css = styleSheet.ToCss();
            Console.WriteLine(css);
            // Outputs
            // .bg { background-image: linear-gradient(rgba(255, 134, 110, 1) 0, rgba(241, 90, 36, 1) 0) }
        }
    }
FlorianRappl commented 4 years ago

Awesome thanks for the report and ...

... :tada: even more appreciate the PR :heart:!

:beers: :beers: Thanks!

FlorianRappl commented 4 years ago

Landed in the preview! Available in devel.

jogibear9988 commented 4 years ago

@FlorianRappl is there a preview nuget?