question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StyleSheets empty in 1.0.0

See original GitHub issue

The StyleSheets property is empty in 1.0.0. Do I need to change something?

var config = Configuration.Default.WithCss();
var parser = new HtmlParser(new HtmlParserOptions { IsScripting = true }, BrowsingContext.New(config));
var html = "<html><head><style>body { background-color: rgba(255, 255, 255, 1); }</style></head><body><div>Test</div></body></html>";
var dom = parser.ParseDocument(html);
var stylesheetCount = dom.StyleSheets.Count(); // -> 1 in 0.17.1, 0 in 1.0.0

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
FlorianRapplcommented, Jan 10, 2023

It is reflected there - we just don’t pin the version to allow scenarios like the one you had here. As far as I know NuGet does not support semantic versioning via ranges (using things like ^, ~ etc.), but that might have changed.

For the 1.0 of the auxiliary libraries we could pin it to [1.0,2.0) - essentially achieving the desired ^.

0reactions
mgansscommented, Jan 10, 2023

OK got it. I wasn’t aware of this. Luckily, AngleSharp.Css 0.16.4 seems to work fine with AngleSharp 0.17 (for my use case at least). Shouldn’t this requirement be reflected in the NuGet dependencies of AngleSharp.Css?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why "document.styleSheets" returns empty value after ...
I found the answer it was because implementing prefixfree plugin which remove the link nodes and then reinsert the processed css in style...
Read more >
CSS file included in angular-cli.json results in empty ...
As a temporary workaround I had to include the CSS stylesheet manually in my index.html.
Read more >
CSS loading as empty file in Custom Theme
For some reason the CSS is an empty file. File path is correct, checked the file in cPanel and it has the full...
Read more >
wp_enqueue_style() | Function
Enqueue all editor scripts. Loads the required media files for the media manager and scripts for media widgets. Enqueue preview scripts.
Read more >
Embedding Template Variables in MODx CSS document. ...
I am able to create (blank?) css documents and utilize css chunks to ... or write php to modify Evolution 1.0.0 to have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found