2016-07-16 47 views
0

我使用ruby安裝程序在Windows上安裝了ruby,然後使用ruby的命令提示符安裝了sass。Sass無法在支架IDE中工作

gem install sass 

它的節目安裝成功,然後我試圖添加一個main.scss文件,但它不工作。

的index.html

<!DOCTYPE html> 
<html> 
<head> 
<title>Page Title</title> 
    <link type="text/css" rel="stylesheet" href="main.scss"> 
</head> 
<body> 

<h1>This is a Heading</h1> 
<p>This is a paragraph.</p> 

</body> 
</html> 

main.scss

$font-stack: Helvetica, sans-serif; 
$primary-color: #333; 

body { 
    font: 100% $font-stack; 
    color: $primary-color; 
} 
+0

我在您的問題編輯。現在你的問題從以前更清楚了。 –

回答

0

你需要支架的IDE與薩斯工作。請參閱我的Question以獲得進一步的幫助。

+0

是的,我正在使用Brackets IDE,並安裝了Brackets SASS插件...但不工作 –

+0

親愛的看到我的問題,它幫助我,Sass正在爲我工​​作。可能是你錯過了一些東西。你需要適當的一步一步的教程,你會在我的答案中看到。 –

0

1)你還需要包括CSS文件,而不是在SCSS您的index.html

<link type="text/css" rel="stylesheet" href="css/main.css"> 

2)這是一個例子brackets.json,讓您的IDE知道一個main.scss文件這將編譯爲../css/main.css相對於您的源文件:

{ 
    "sass.enabled": false, 
    "sass.compiler": "libsass", 
    "path": { 
     "scss/styles.scss": { 
      "sass.enabled": true, 
      "sass.options": {     
       "outputDir": "../css/", 
       "imagePath": null, 
       "sourceComments": false, 
       "outputStyle": "nested" 
      }, 
      "linting.collapsed": true 
     } 
    } 
} 
相關問題