Skip to content

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

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
nazar554 opened this issue Jun 10, 2020 · 1 comment
Closed
Assignees
Labels

Comments

@nazar554
Copy link

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

@nazar554 nazar554 added the bug label Jun 10, 2020
@FlorianRappl FlorianRappl self-assigned this Jun 11, 2020
FlorianRappl added a commit that referenced this issue Jun 11, 2020
@FlorianRappl
Copy link
Contributor

Thanks for the report!

A fix is available in 0.14.2.

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

No branches or pull requests

2 participants