simonschaufi / cssmin

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

Declaration values with a line endings will get recognised as declaration ending #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have the following in the CSS file:

    @font-face {
      font-family: "FuturaBook";
      src: url("../other/futura-book-webfont.eot");
      src: local("☺"),
        url("../other/futura-book-webfont.woff") format("woff"),
        url("../other/futura-book-webfont.ttf") format("truetype"),
        url("../other/futura-book-webfont.svg#webfontFGT2JwHV") format("svg");
      font-weight: normal;
      font-style: normal;
    }

I am getting the following as output:

    @charset "utf-8";@font-face{font-family:"FuturaBook";src:url("../other/futura-book-webfont.eot");src:local("☺"),;url("../other/futura-book-webfont.woff") format("woff"),
     url("../other/futura-book-webfont.ttf") format("truetype"),
     url("../other/futura-book-webfont.svg#webfontFGT2JwHV") format("svg");
     font-weight:normal;font-style:normal}

The issue is after  local("☺"),  it is adding adding an extra semicolon which 
is completely messing everything up.

I am using the following in my PHP:

    $config = array();
    CssMin::minify($str, $config);

CssMin Version: 2.0.2.0079.beta2
System OS: Ubuntu 9.10
PHP Version 5.3.5

I can provide any other info you may need, just ask :)

Original issue reported on code.google.com by kbj...@gmail.com on 2 Feb 2011 at 12:09

GoogleCodeExporter commented 9 years ago
This behavior is intentional but not thought out well. background was to 
recognise declarations with missing semicolon. But as your issue shows a line 
ending is not a valid sign for a brocken declaration but a colon within a 
declaration value should be (excluding strings or url() statements for sure).

Original comment by joe.scylla on 2 Feb 2011 at 10:04

GoogleCodeExporter commented 9 years ago

Original comment by joe.scylla on 2 Feb 2011 at 10:04

GoogleCodeExporter commented 9 years ago
Fixed in Revision 85: http://code.google.com/p/cssmin/source/detail?r=85

Thanks for reporting this bug.

Original comment by joe.scylla on 2 Feb 2011 at 12:24