Skip to content

Getting CssText property throws when style includes all longhands of grid-template #68

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 Apr 21, 2021 · 0 comments
Assignees
Milestone

Comments

@mganss
Copy link
Contributor

mganss commented Apr 21, 2021

Repro:

var p = new HtmlParser(new HtmlParserOptions(), BrowsingContext.New(new Configuration().WithCss(new CssParserOptions())));
var dom = p.ParseDocument(@"<html><body><span style=""grid-template-areas: none; grid-template-columns: none; grid-template-rows: none""></body></html>");
var div = dom.QuerySelector("span");
var style = div.GetStyle();
var css = style.CssText;

This throws here:

var areas = ((CssTupleValue)_areas).Items;

with the message

Unable to cast object of type 'AngleSharp.Css.Values.Constant`1[System.Object]' to type 'AngleSharp.Css.Values.CssTupleValue'.

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