premailer / css_parser

Ruby CSS Parser
Other
279 stars 110 forks source link

Problem with background-image parsing #21

Closed mccuskk closed 11 years ago

mccuskk commented 13 years ago

Hi

I wanted to extract gradients from my CSS but they were being cleared because they are not formatted as a url. To get all variants of the CSS gradient options I changed the split_declaration for background-image in rule_set.rb to be :-

split_declaration('background', 'background-image', value.slice!(Regexp.union(CssParser::URI_RX, /none/i, /[a-z-]gradient([a-z ,#%0-9()])$/i)))

Is there any chance you could add this or a variant?

Many Thanks

Kieran

grosser commented 11 years ago

Just merged 2 related PRs, please try 1.3.1 and make a pull if it's still an issue.