Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
5 tasks done
Fraaankes opened this issue Feb 1, 2020 · 3 comments
Closed
5 tasks done

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

Fraaankes opened this issue Feb 1, 2020 · 3 comments

Comments

@Fraaankes
Copy link

Bug Report

Prerequisites

  • Can you reproduce the problem in a MWE?
  • Are you running the latest version of AngleSharp?
  • Did you check the FAQs to see if that helps you?
  • Are you reporting to the correct repository? (there are multiple AngleSharp libraries, e.g., AngleSharp.Css for CSS support)
  • Did you perform a search in the issues?

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
Copy link
Contributor

Awesome thanks for the report and ...

... 🎉 even more appreciate the PR ❤️!

🍻 🍻 Thanks!

@FlorianRappl
Copy link
Contributor

Landed in the preview! Available in devel.

@jogibear9988
Copy link
Contributor

@FlorianRappl is there a preview nuget?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants