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

Counters used in content css property are broken after calling ToCss #58

Closed nazar554 closed 4 years ago

nazar554 commented 4 years ago

Bug Report

Description

After parsing a CSS stylesheet with counter() call inside content: property, ToCss() returns invalid CSS.

Steps to Reproduce

var parser = new CssParser();
var sheet = parser.ParseStyleSheet(@"
h1::before {
  counter-increment: h1;
  content: counter(h1) "".\00A0"";
}
");
var css = sheet.ToCss();

Expected behavior: h1::before { counter-increment: h1 1; content: counter(h1) ". " } Actual behavior: h1::before { counter-increment: h1 1; content: h1 decimal ". " }

Environment details: [OS, .NET Runtime, ...] .NET 4.8/Windows 10 AngleSharp.Css 0.14.1

FlorianRappl commented 4 years ago

Thanks for the report!

A fix is available in 0.14.2.