断点mixin编译错误

时间:2016-12-10 11:35:07

标签: sass gulp

我一直致力于一个涉及 Sass 断点的项目。我正在使用 gulp 来处理工作流程。

事情一直很好,直到我得到这个编译错误,这阻碍了进一步的流程。我正在分享代码以及我在Gitbash上收到的错误。

_nav.scss

        a{
            color:$navForeground;
            text-decoration:none;
            text-align:center;
            display:inline-block;
            padding:10px;
            font-size:1.5em

            @include breakpoint(max-width $small){
                            font-size:1.2em;
                            span{
                                display:none;
                            }
                        }
        }//a

_nav.scss汇编为styles.css。以下是我在bash中遇到的错误。

Compilation failed in 1 files.

[16:32:22] { [Error:     error components/sass/style.scss (Line 25 of C:/Users/user/Desktop/responsive/components/sass/modules/_nav.scss: Invalid CSS after "  font-size:1.5em": expected ";", was "@include breakp...")
    Compilation failed in 1 files.
    ]
      message: '    error components/sass/style.scss (Line 25 of C:/Users/user/Desktop/responsive/
components/sass/modules/_nav.scss: Invalid CSS after "\t\t\tfont-size:1.5em": expected ";", was "@include breakp...")\r\nCompilation failed in 1 files.\r\n',
      fileName: 'C:\\Users\\user\\desktop\\responsive\\components\\sass\\style.scss',
      showStack: false,
      showProperties: true,
      plugin: 'gulp-compass',
      __safety: { toString: [Function: bound ] } }

如果有人可以提供帮助,我会非常感激。提前谢谢。

1 个答案:

答案 0 :(得分:1)

您在font-size: 1.5em; @include breakpoint(max-width $small) { 之后忘记了分号:

function queryFunction(term){
     return this.FullName.indexOf(term) != -1
}
table.where(queryFunction, term)