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

@media block gives syntax error

crisp-tweakers opened this issue · comments

@media (min-width: 1220px) {
  div { width:auto; }
}

gives an "Syntax error in CSS: Identifier expected. Got “}” [line no: 3]"

This looks like a regression in version 8.4.0 - I'm suspecting #162

I can confirm the issue. We also had errors in @keyframes rules.
Reverting to 8.3.0 fixed the problem.

Is there any progress with this? I tried to upgrade from 8.3.0 to latest code from composer which claims to be be "8.4.0" even though no such version has been released yet in GitHub. That version fails to parse even simple media queries like

@media print
{
	html
	{
		background: white;
		color: black;
	}
}

so I have to revert back to 8.3.0 and apply PHP 8 compatibility fixes manually.