premailer / css_parser

Ruby CSS Parser
Other
279 stars 110 forks source link

Fix parsing space-less media-features #141

Closed jdelStrother closed 1 year ago

jdelStrother commented 1 year ago

Previously, @media (width:500px) would be successfully parsed, but not @media(width:500px) - it would result in @media(width:500px) as a single token, effectively ignoring the media:500px media-feature and assigning all the rules in that media query to the :all namespace.

This tokenizes ( and ) separately ... which naively seems ok to me and passes all the tests, but I'd confess to being a little nervous how it behaves with real-world CSS.

Fixes #139

Pre-Merge Checklist

grosser commented 1 year ago

1.16.0