[dev] CSS Parsing class

Rui Carneiro rui.carneiro at portugalmail.net
Thu Mar 21 19:28:00 UTC 2013


On Thu, Mar 21, 2013 at 5:25 AM, Michael M Slusarz <slusarz at horde.org>wrote:

> As mentioned previously: I have gone through EVERY released application to
> compare the output using a graphical diff tool.  **EVERYTHING** csstidy
> does the new code does.  Again: this has been verified but actually looking
> at the output.  Not to mention the upstream code has extensive unit tests
> to ensure the code works properly.  Whether the new code breaks someone's
> personal CSS additions is irrelevant. Because there are other people out
> there - as seen on the list - that have valid CSS code that doesn't work
> currently.  In this scenario, either way is broken.  The new way is just
> less broken.
>
> (For the record: all the changes made since the original import of the
> upstream code are either optimizations or CSS3 fixes, neither of which
> affects the behavior of the current released code).
>


I am one of the "other people out there" mentioned by Michael and I found
several problems with PHP-CSS-Parser.

My files are not equal with and without PHP-CSS-Parser, far from that. Some
of the issues I found:

*Original:*
1- box-shadow:0 3px 4px rgba(0,0,0,0.4);
2- opacity:0.7;
3- line-height:1.2em;
4-
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f6',endColorstr='#e1e2e5',GradientType=0);
5- margin: 23px 3px 0 8px;

*After parse and compress:*
1- box-shadow:0 3px 4px rgba(0,0,0,0,4);
2- opacity:0;
3- line-height:1em;
4- No output
5- margin:23px 3px 0 0;

These are some cases I found on the login page ONLY. There is also some CSS
rules that disappear and I have no
idea why (maybe some optimizer?) In my opinion this PHP-CSS-Parser is also
broken.

Why don't you just let this new parser thing be a config like the old
$conf['cachecssparams']['compress']? With the
current state of Horde_Themes_Css i will need to rewrite this class top to
bottom to work again like it was before :\


-- 
Rui Carneiro
Software Engineer*
*
*Portugalmail* | plataformas de inovação
*w.* http://www.portugalmail.net


More information about the dev mailing list