为什么我的嵌套样式不起作用(使用node-sass版本4.13.0)

时间:2019-12-07 18:04:38

标签: sass nested

我正在用scss做一个投资组合站点,但是当我尝试做嵌套样式时却给我一个错误。我正在使用带有脚本p1 = multiprocessing.Process(target=main, args=("stock.mp4",visualization,count)) p2 = multiprocessing.Process(target=main, args=("stock2.mp4",visualization,count)) p3 = multiprocessing.Process(target=main, args=("stock3.mp4",visualization,count)) p1.start() p2.start() p3.start() p1.join() p2.join() p3.join() 的node-sass版本4.13.0进行编译。

这是我的代码:

"node-sass --include-path public/css src/scss/style.scss public/css/style.css"

这正在产生

.project-container{
  width: 100%;
  height: 30vh;

  img: {
    display: block;
    width: 100%;
    height: 100%;
  }
}

当我尝试用类名替换.project-container { width: 100%; height: 30vh; img-display: block; img-width: 100%; img-height: 100%; } 时,会引发错误:

img

1 个答案:

答案 0 :(得分:1)

:在img之后

#include <stdio.h>
#include <stdlib.h>

void readFile(const char *fileName, char *text);

void readFile(const char *fileName, char *text)
{
    FILE *f;
    long length;

    f = fopen(fileName, "r");
    fseek (f, 0, SEEK_END);
    length = ftell (f);
    fseek (f, 0, SEEK_SET);
    text = malloc(length + 1);
    if(text)
    {
        fread (text, 1, length, f);
    }
    fclose (f);
    text[length] = '\0';

    printf(text);
}

int main(void)
{
    char *fileText;
    readFile("config.txt", fileText);

    return 1;
}