premailer / css_parser

Ruby CSS Parser
Other
279 stars 110 forks source link

Passing a hex color ending by 0 to border-color while having a border-top set raises an exception. #68

Closed anniecodes closed 7 years ago

anniecodes commented 8 years ago

When passing a Hex color ending by 0 to border-color while also setting a border-top(as well as bottom, left and right), you get a comparison of Fixnum with nil failed exception.

This works:

td {
  border-top: 5px solid;
  border-color: #fffff1;
}

This blows up :

td {
  border-top: 5px solid;
  border-color: #fffff0;
}

Using border-top-color instead of border-color works :

td {
  border-top: 5px solid;
  border-top-color: #fffff0;
}
grosser commented 8 years ago

good times :D

can you make a PR for that ?

anniecodes commented 8 years ago

Sure. I'll look into it before the end of the week. I didn't take a look at the parser but I assume I'm going to have some RegEx fun times 💖

akzhan commented 7 years ago

Looks like fixed a time ago. Just added test for it.