Open
Description
Prerequisites
- Can you reproduce the problem in a MWE?
- Are you running the latest version of AngleSharp.Css?
- Did you check the FAQs to see if that helps you?
- Are you reporting to the correct repository? (there are multiple AngleSharp libraries, e.g.,
AngleSharp.Xml
for Xml support) - Did you perform a search in the issues?
Description
Overriding inheritance does not seem to work as expected. Same behaviour regardless of using the shorthand property or the individual properties.
Using Anglesharp.CSS 1.0.0-beta.151.
Steps to Reproduce
var text = """
<html lang="en">
<head>
<style>
table {
border: medium solid;
}
table * {
border: inherit;
}
</style>
<title></title>
</head>
<body>
<table>
<tbody>
<tr><td>hello1</td></tr>
<tr><td>hello2</td></tr>
<tr><td>hello3</td></tr>
</tbody>
</table>
</body>
</html>
""";
var ctx = BrowsingContext.New(Configuration.Default.WithDefaultLoader().WithCss());
var p = new HtmlParser(new HtmlParserOptions(), ctx);
var doc = await p.ParseDocumentAsync(text);
var td = doc.QuerySelector("body>table>tbody>tr:nth-child(1)>td");
var style = td.ComputeCurrentStyle();
Expected Behavior
The td
style should contain the same border attribute values as the parent table.
Actual Behavior
The td
style border attribute values are all initial
.
Possible Solution / Known Workarounds
No response