Skip to content

Support @counter-style and @font-feature-values #102

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
mganss opened this issue Jan 20, 2022 · 2 comments
Closed

Support @counter-style and @font-feature-values #102

mganss opened this issue Jan 20, 2022 · 2 comments
Milestone

Comments

@mganss
Copy link
Contributor

mganss commented Jan 20, 2022

The at-rules @counter-style and @font-feature-values are not currently supported by the parser.

var html = @"<style>
                @font-feature-values Font One {
                    @styleset {
                    nice-style: 12;
                    }
                }
                @counter-style thumbs {
                  system: cyclic;
                  symbols: ""\1F44D"";
                  suffix: "" "";
                }
            </style>";
var parser = new HtmlParser(new HtmlParserOptions(), BrowsingContext.New(Configuration.Default.WithCss(new CssParserOptions())));
var dom = parser.ParseDocument(html);
var styleSheet = dom.StyleSheets[0] as ICssStyleSheet;
var css = styleSheet.ToCss(); // -> ""
var rules = styleSheet.Rules.Length; // -> 0
@FlorianRappl
Copy link
Contributor

Landed in devel.

@mganss
Copy link
Contributor Author

mganss commented Aug 3, 2023

@FlorianRappl In the example above, ToCss() produces @font-feature-values { } @counter-style { } using v0.17.0 and above. Is this expected behavior?

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

2 participants