[dev] CSS Parsing class

Jan Schneider jan at horde.org
Fri Mar 22 13:25:47 UTC 2013


Zitat von Rui Carneiro <rui.carneiro at portugalmail.net>:

> On Thu, Mar 21, 2013 at 8:22 PM, Michael M Slusarz <slusarz at horde.org>wrote:
>
>> Quoting Rui Carneiro <rui.carneiro at portugalmail.net**>:
>>
>>> 4-
>>> filter:progid:**DXImageTransform.Microsoft.**gradient(startColorstr='#**
>>> f4f4f6',endColorstr='#e1e2e5',**GradientType=0);
>>>
>>
>> And #4 is definitely NOT supported.   It is not supported by current
>> csstidy either.  If it worked previously that was **entirely** by chance,
>> but this is not a critical issue since it only affects IE8, which we are
>> not actively theme supporting anymore (IE8 is in "do enough to make it
>> work, but there is no expectation that advanced CSS features will work"
>> stage).
>>
>
> This implies that the first rule of IE8 kronolith css is deprecated:
> https://github.com/horde/horde/blob/master/kronolith/themes/default/ie8.css
>
>
>> Why don't you just let this new parser thing be a config like the old
>>> $conf['cachecssparams']['**compress']?
>>>
>>
>> Because you **cannot** make it optional.  If using caching, you are moving
>> css files to a different relative location on the server.  As such, we
>> absolutely HAVE to 1) parse/translate relative URLs and 2) parse import
>> statements.  Period.  Neither of these works correctly with csstidy.
>>  Period.  So we need some kind of parser to do this correctly.
>>
>> If you are not comfortable with this, you need to disable caching.  There
>> is no other option.
>
>
> Again, I think it should be a away, via config, to avoid
> parsing/compression. CSS parsers will always have problems, they will never
> support 100% of the current
> state of art of CSS and I can't believe that is no better solution than
> disable cache.
>
> I think this could be achieve with a simple preg_replace and 1 or 2 simple
> regexs only when compress is disabled, just like it was before the compress
> config deprecation and I really can't see what is your problem with that.

Good point.

> Another thing that I notice is that PHP-CSS-Parser is extremely slow. This
> is not a big issue since this is a run once class but I think it should
> also be mentioned .
>
> --
> Rui Carneiro
> Software Engineer*
> *
> *Portugalmail* | plataformas de inovação
> *w.* http://www.portugalmail.net


-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the dev mailing list