Skip to content

Commit

Permalink
use black as default color for borders
Browse files Browse the repository at this point in the history
  • Loading branch information
tillwolff committed Mar 25, 2017
1 parent 9a2f760 commit cf0a81b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion EPPlus.Html/Converters/ExcelToCss.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ internal static string ToCssProperty(this ExcelBorderItem excelBorderItem)
{
if (excelBorderItem != null)
{
return excelBorderItem.Style.ToCssProperty() + " " + excelBorderItem.Color.ToHexCode();
string color = (excelBorderItem.Color.Rgb != null)
? excelBorderItem.Color.ToHexCode()
: "black";

return excelBorderItem.Style.ToCssProperty() + " " + color;
}
else
{
Expand Down

0 comments on commit cf0a81b

Please sign in to comment.