jianlinwei / cssmin

Automatically exported from code.google.com/p/cssmin
0 stars 0 forks source link

Erroneous recognition of T_STRING start in comments #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
.cke_skin_kama textarea.cke_dialog_ui_input_textarea
{
    background-color: white;
    border: none;
    padding: 0px;
    width: 100%;
    /*
     * IE6 BUG: Scrollbars in textareas can overflow even if the outer DIV is set to overflow:hidden.
     * So leave 1% width for the scrollbar. In most situations the 1% isn't noticeable by users.
     */
    _width: 99%;
    overflow: auto;
    resize: none;
}

is transformed in :

.cke_skin_kama 
textarea.cke_dialog_ui_input_textarea{background-color:white;border:none;padding
:0px;width:100%;

With the following message :

Notice: Undefined offset: 7 in C:\Program Files\Apache Software 
Foundation\Apache2.2\htdocs\_minify\include\cssmin\cssmin.php on line 399 Call 
Stack: 0.0024 375192 1. {main}() C:\Program Files\Apache Software 
Foundation\Apache2.2\htdocs\_minify\index.php:0 0.2211 1699104 2. 
CssMin::minify() C:\Program Files\Apache Software 
Foundation\Apache2.2\htdocs\_minify\index.php:12

PHP 5.3 on XP

Original issue reported on code.google.com by d.dussou...@2n-tech.com on 10 Aug 2010 at 11:55

GoogleCodeExporter commented 9 years ago
Another code give the same probleme. It's seems that the comment does not need 
to be between {} :

.x-layout-split{
    position:absolute;
    height:5px;
    width:5px;
    line-height:1px;
    font-size:1px;
    z-index:3;
    background-color:transparent;
}

/* IE6 strict won't drag w/out a color */
.ext-strict .ext-ie6 .x-layout-split{
    background-color: #fff !important;
    filter: alpha(opacity=1);
}

is transformed to :

.x-layout-split{position:absolute;height:5px;width:5px;line-height:1px;font-size
:1px;z-index:3;background-color:transparent}

But no error message.

Original comment by d.dussou...@2n-tech.com on 10 Aug 2010 at 12:00

GoogleCodeExporter commented 9 years ago
Thanks for reporting. This bug is fixed in version 2.0.1.b2. 

Now both cases getting minified correctly to:

{{{
.cke_skin_kama 
textarea.cke_dialog_ui_input_textarea{background-color:white;border:none;padding
:0px;width:100%;_width:99%;overflow:auto;resize:none}
}}}

{{{
.x-layout-split{position:absolute;height:5px;width:5px;line-height:1px;font-size
:1px;z-index:3;background-color:transparent}.ext-strict .ext-ie6 
.x-layout-split{background-color:#fff !important;filter:alpha(opacity=1)}
}}}

Original comment by joe.scylla on 10 Aug 2010 at 12:34

GoogleCodeExporter commented 9 years ago
Thank you for your reactivity !
Everything seems to work well for me now.
Just some stats for you :
I minified 152 css files in 18.932815 s
Original files (total) : 985.032 Ko
Compressed files (total) : 809.538 Ko
So 17.82% gain

Thank you very much !

Original comment by d.dussou...@2n-tech.com on 10 Aug 2010 at 1:20

GoogleCodeExporter commented 9 years ago
I have to thank you for testing the beta version and reporting bugs ;).

Original comment by joe.scylla on 11 Aug 2010 at 2:30