A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/AngleSharp/AngleSharp.Css/issues/62 below:

GitHub ยท Where software is built

New Feature Proposal Description

When using IElement.ComputeCurrentStyle i would expect CSS variables to be resolved for example when parsing the document:

<!DOCTYPE html>
<html>
<head>
    <style>
        :root {
            --color: #FFFFFF;
        }

        p {
            color: var(--color);
        }
    </style>
</head>
<body>
    <p>This is a test</p>
</body>
</html>

I would expect doc.GetDescendantsAndSelf().OfType<IHtmlParagraphElement>().First().ComputeCurrentStyle()["color"] == "#FFFFFF" for example. But instead its rgb(var(--color)). However i would understand if ComputeCurrentStyle should not resolve CSS variables if thats the case i think it would be useful to have an extention method or utility that can do this.

Is this something you are interested in adding or if you pointed me in the place you this method should belong i could have a crack at submitting a PR.

IanKemp, jmalatia and kmlkt


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4