AngleSharp / AngleSharp.Css

:angel: Library to enable support for cascading stylesheets in AngleSharp.
https://anglesharp.github.io
MIT License
72 stars 34 forks source link

CSS **boder-style** not properly expanded when 3 values are given. #34

Closed atlastodor closed 5 years ago

atlastodor commented 5 years ago

Bug Report

Prerequisites

For more information, see the CONTRIBUTING guide.

Description

CSS boder-style not properly expanded when 3 values are given.

Steps to Reproduce

  1. Configure AngleSharp WithCss.
  2. Using a new BrowsingContext, parse this HTML:
    <!DOCTYPE html>
    <html>
    <head><title></title></head>
    <body style="border-style: hidden double dashed;"></body>
    </html>
  3. Get the style for the Body element. var styleDeclaration = document.Body.ComputeCurrentStyle();

Expected behavior: As per CSS border-style

When three values are specified, the first style applies to the top, the second to the left and right, the third to the bottom.

"border-top-style: hidden"
"border-left-style: double"
"border-right-style: double"
"border-bottom-style: dashed"

Actual behavior:

"border-top-style: double"
"border-left-style: double"
"border-right-style: hidden"
"border-bottom-style: dashed"

Environment details: Windows 10, .Net 4.7

Possible Solution

Fix the order into which the property is expanded.

FlorianRappl commented 5 years ago

Landed in devel.