Closed
Description
Bug Report
Prerequisites
- [ Yes ] Can you reproduce the problem in a [MWE]
- [ Yes 0.12.1 ] Are you running the latest version of AngleSharp?
- [ Yes ] Did you check the FAQs to see if that helps you?
- [ Yes ] Are you reporting to the correct repository? (if its an issue with the core library, please report to
AngleSharp
directly) - [ Yes ] Did you perform a search in the issues?
For more information, see the CONTRIBUTING
guide.
Description
CSS shorthand property text-decoration is not properly expanded.
Steps to Reproduce
- Configure AngleSharp WithCss.
- Using a new BrowsingContext, parse this HTML:
<!DOCTYPE html>
<html>
<head><title></title></head>
<body style="text-decoration: underline dotted;"></body>
</html>
- Get the style for the Body element.
var styleDeclaration = document.Body.ComputeCurrentStyle();
Expected behavior:
As per CSS text-decoration
<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'>.
"text-decoration-style: dotted"
"text-decoration-line: underline"
Actual behavior:
"text-decoration-style: underline"
"text-decoration-line: dotted"
Environment details:
Windows 10, .Net 4.7
Possible Solution
Swap so text-decoration-style is expanded into text-decoration-line and vice-versa.
PS: When you are changing CSS properties behavior, could you please override the ToString() method to return the CssText. This will make working in the debugger much easier.