Skip to content

Missing space in @media(...) throws exception #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
voehl opened this issue Jun 25, 2016 · 1 comment
Closed

Missing space in @media(...) throws exception #104

voehl opened this issue Jun 25, 2016 · 1 comment

Comments

@voehl
Copy link

voehl commented Jun 25, 2016

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();
@sabberworm
Copy link
Collaborator

Closing as duplicate of #75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants