0

There is a problem with cssmin pluggin for grunt that i can't avoid and there isn't to much information at respect. Strange, because i think that it should be a common issue.

i have this css file:

@import url("//fonts.googleapis.com/css?family=PT+Sans Narrow:400,700");

and this is my grunt csssmin configuation (pretty simple)

        cssmin: {
        options: {
             keepSpecialComments: 0 //delete comments
        },
        css: {
            files: {                  
              './public/assets/stylesheets/all.css': ['./public/assets/stylesheets/all.css']
            }
        }
    },

and when i execute the grunt cssmin task that is what i get:

@charset "UTF-8";@import url(//fonts.googleapis.com/css?family=PT+SansNarrow:400,700);

the quotes (") are stripped, then the url isn't property loaded and the font is missed.

Any idea how to solve it? i was playing with the cssmin options like added a base url, but it didn't work for me.

Thanks in advance

xavadu
  • 313
  • 1
  • 3
  • 10
  • 1
    have you tried with an encoded url http://fonts.googleapis.com/css?family=PT+Sans%20Narrow:400,700 for example, it might be the space causing the issue. – roughcoder Oct 22 '14 at 15:55
  • Thanks @roughcoder it looks to work, anyway the quotes are still stripped, but looks that the main problem was the the blank space, thet are stripped and the url doesn't match. – xavadu Nov 03 '14 at 11:56

0 Answers0