Missing space in @media(...) throws exception
voehl opened this issue · comments
voehl commented
Unfortunately, when parsing stylesheets without the space in "@ media(" the parser throws an UnexpectedTokenException.
Example:
<?php
use Sabberworm\CSS\Parser;
require '../vendor/autoload.php';
// This works:
(new Parser('@media (min-width: 768px){.class{color:red}}'))->parse();
// This throws an exception: 'Identifier expected. Got “: 768”'
(new Parser('@media(min-width: 768px){.class{color:red}}'))->parse();
Raphael Schweikert commented
Closing as duplicate of #75