Skip to content

Commit 19163df

Browse files
committed
Prefer border serialization to explicit sides
1 parent 492adae commit 19163df

13 files changed

+13
-13
lines changed

src/AngleSharp.Css.Tests/Styling/CssSheet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void CssSheetSerializeBorder1pxOutset()
8282
public void CssSheetSerializeBorder1pxSolidWithColor()
8383
{
8484
var cssSrc = "#rule1 { border: 1px solid #BBCCEB; border-top: none }";
85-
var expected = "#rule1 { border: 1px solid rgba(187, 204, 235, 1); border-top: none }";
85+
var expected = "#rule1 { border-top: none; border-right: 1px solid rgba(187, 204, 235, 1); border-bottom: 1px solid rgba(187, 204, 235, 1); border-left: 1px solid rgba(187, 204, 235, 1) }";
8686
var stylesheet = ParseStyleSheet(cssSrc);
8787
var cssText = stylesheet.ToCss();
8888
Assert.AreEqual(expected, cssText);

src/AngleSharp.Css/Declarations/BorderBottomColorDeclaration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static class BorderBottomColorDeclaration
1111
public static String[] Shorthands = new[]
1212
{
1313
PropertyNames.Border,
14-
PropertyNames.BorderColor,
1514
PropertyNames.BorderBottom,
15+
PropertyNames.BorderColor,
1616
};
1717

1818
public static IValueConverter Converter = CurrentColorConverter;

src/AngleSharp.Css/Declarations/BorderBottomStyleDeclaration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static class BorderBottomStyleDeclaration
1111
public static String[] Shorthands = new[]
1212
{
1313
PropertyNames.Border,
14-
PropertyNames.BorderStyle,
1514
PropertyNames.BorderBottom,
15+
PropertyNames.BorderStyle,
1616
};
1717

1818
public static IValueConverter Converter = LineStyleConverter;

src/AngleSharp.Css/Declarations/BorderBottomWidthDeclaration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static class BorderBottomWidthDeclaration
1111
public static String[] Shorthands = new[]
1212
{
1313
PropertyNames.Border,
14-
PropertyNames.BorderWidth,
1514
PropertyNames.BorderBottom,
15+
PropertyNames.BorderWidth,
1616
};
1717

1818
public static IValueConverter Converter = LineWidthConverter;

src/AngleSharp.Css/Declarations/BorderLeftColorDeclaration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static class BorderLeftColorDeclaration
1111
public static String[] Shorthands = new[]
1212
{
1313
PropertyNames.Border,
14-
PropertyNames.BorderColor,
1514
PropertyNames.BorderLeft,
15+
PropertyNames.BorderColor,
1616
};
1717

1818
public static IValueConverter Converter = CurrentColorConverter;

src/AngleSharp.Css/Declarations/BorderLeftStyleDeclaration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static class BorderLeftStyleDeclaration
1111
public static String[] Shorthands = new[]
1212
{
1313
PropertyNames.Border,
14-
PropertyNames.BorderStyle,
1514
PropertyNames.BorderLeft,
15+
PropertyNames.BorderStyle,
1616
};
1717

1818
public static IValueConverter Converter = LineStyleConverter;

src/AngleSharp.Css/Declarations/BorderLeftWidthDeclaration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static class BorderLeftWidthDeclaration
1111
public static String[] Shorthands = new[]
1212
{
1313
PropertyNames.Border,
14-
PropertyNames.BorderWidth,
1514
PropertyNames.BorderLeft,
15+
PropertyNames.BorderWidth,
1616
};
1717

1818
public static IValueConverter Converter = LineWidthConverter;

src/AngleSharp.Css/Declarations/BorderRightColorDeclaration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static class BorderRightColorDeclaration
1111
public static String[] Shorthands = new[]
1212
{
1313
PropertyNames.Border,
14-
PropertyNames.BorderColor,
1514
PropertyNames.BorderRight,
15+
PropertyNames.BorderColor,
1616
};
1717

1818
public static IValueConverter Converter = CurrentColorConverter;

src/AngleSharp.Css/Declarations/BorderRightStyleDeclaration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static class BorderRightStyleDeclaration
1111
public static String[] Shorthands = new[]
1212
{
1313
PropertyNames.Border,
14-
PropertyNames.BorderStyle,
1514
PropertyNames.BorderRight,
15+
PropertyNames.BorderStyle,
1616
};
1717

1818
public static IValueConverter Converter = LineStyleConverter;

src/AngleSharp.Css/Declarations/BorderRightWidthDeclaration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static class BorderRightWidthDeclaration
1111
public static String[] Shorthands = new[]
1212
{
1313
PropertyNames.Border,
14-
PropertyNames.BorderWidth,
1514
PropertyNames.BorderRight,
15+
PropertyNames.BorderWidth,
1616
};
1717

1818
public static IValueConverter Converter = LineWidthConverter;

src/AngleSharp.Css/Declarations/BorderTopColorDeclaration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static class BorderTopColorDeclaration
1111
public static String[] Shorthands = new[]
1212
{
1313
PropertyNames.Border,
14-
PropertyNames.BorderColor,
1514
PropertyNames.BorderTop,
15+
PropertyNames.BorderColor,
1616
};
1717

1818
public static IValueConverter Converter = CurrentColorConverter;

src/AngleSharp.Css/Declarations/BorderTopStyleDeclaration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static class BorderTopStyleDeclaration
1111
public static String[] Shorthands = new[]
1212
{
1313
PropertyNames.Border,
14-
PropertyNames.BorderStyle,
1514
PropertyNames.BorderTop,
15+
PropertyNames.BorderStyle,
1616
};
1717

1818
public static IValueConverter Converter = LineStyleConverter;

src/AngleSharp.Css/Declarations/BorderTopWidthDeclaration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ static class BorderTopWidthDeclaration
1111
public static String[] Shorthands = new[]
1212
{
1313
PropertyNames.Border,
14-
PropertyNames.BorderWidth,
1514
PropertyNames.BorderTop,
15+
PropertyNames.BorderWidth,
1616
};
1717

1818
public static IValueConverter Converter = LineWidthConverter;

0 commit comments

Comments
 (0)