咕噜-的contrib少失败,角料@media查询 [英] Grunt-contrib-less fails with Angular-Material @media queries

查看:857
本文介绍了咕噜-的contrib少失败,角料@media查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在与角料和放一个奇怪的错误;咕噜-的contrib少。

I'm experiencing a strange error with angular-material & grunt-contrib-less.

每当我试图运行它失败,出现以下错误信息只是咕噜少任务

Every time i'm trying to run a simply grunt less task it fails with the following error message

>> ParseError: media definitions require block statements after any features in lib/angular-material/angular-material.css on line 654, column 14:
>> 653 
>> 654 @media screen\0 {
>> 655   .flex {
Warning: Error compiling less/libs.less

我采用了棱角分明的材料(1.0.1版)的最新的稳定版本。

I'm using the latest stable release of angular material (v.1.0.1).

它需要在更短的是这样的:

It's required in less like this:

@import(少)../ LIB /角材/角material.css;

这是我的任务:

less: {
            options: {
                compress: true
            },

            libs: {
                files: {
                    'public/src/css/libs.css': 'less/libs.less'
                },
                options: {
                    sourceMap: true,
                    outputSourceFiles: true,
                    sourceMapFilename: 'public/src/css/libs.css.map',
                    sourceMapURL: '/src/css/libs.css.map',
                    sourceMapRootpath: '/'
                }
            }

          ....(more tasks here)
}

我喜欢这方面的一些帮助。

I would love some help on this.

推荐答案

您应该使用(在线)而不是(少)

当您使用(少)导入该文件将被视为一个较小的文件,无论扩展。因此,在尝试处理CSS code,仿佛它是更少。

When you use (less) the file you import will be treated as a less file, no matter the extension. Therefore, you are trying to process css code as if it was less.

当您使用(在线)文件的内容只会被列入,因为他们,不作任何处理。

When you use (inline) the file contents will just be included as they are, without being processed.

您可以在阅读更​​多关于这个少文档

这篇关于咕噜-的contrib少失败,角料@media查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆