sabberworm / PHP-CSS-Parser

A Parser for CSS Files written in PHP. Allows extraction of CSS files into a data structure, manipulation of said structure and output as (optimized) CSS

Home Page:http://www.sabberworm.com/blog/2010/6/10/php-css-parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught exception 'Sabberworm\CSS\Parsing\SourceException'

ossinkine opened this issue · comments

This code throws SourceException with message Unopened { [line no: 5]

$css = <<<CSS
@media(min-width:480px){
    body{
        background-color:lightgreen;
    }
}
CSS;

$parser = new Sabberworm\CSS\Parser($css);
$css = $parser->parse();

It seems the parser expects a space after @media.

Closing as duplicate of #75.