html
1<!-- index.html --> 2<html> 3<head> 4 <meta charset="utf-8"> 5 <title>lesson_php</title> 6 <link rel="stylesheet" href="stylesheet.css"> 7<head> 8<body> 9 10 <div class="top-wrapper"> 11 <h1>practice sass</h1> 12 <h2 class="red-color">redColor</h2> 13 </div> 14 15</body> 16</html> 17
css
1/* stylesheet.min.css ここは勝手に入力されてました。 */ 2.red-color{color:red} 3.top-wrapper{background-color:green;height:auto;width:600px} 4.top-wrapper h1{color:white} 5
css
1/* stylesheet.scss */ 2.red-color { 3 color: red; 4} 5 6.top-wrapper { 7 background-color: green; 8 height: auto; 9 width: 600px; 10 h1 { 11 color: white; 12 } 13 14} 15
sassはインストールしてあるし、Atomのパッケージでsass-autocompileもインストールしたんですけど、まだ何か必要なことがあるのでしょうか??
sass -v
Ruby Sass 3.7.4
node-sass -v
node-sass 4.12.0 (Wrapper) [JavaScript]
libsass 3.5.4 (Sass Compiler) [C/C++]
※ 反映されないとは、stylesheet.scss に入力された値がindex.htmlに反映されていないことです。
今はindex.htmlのh1, h2タグ内の文字だけがなんの装飾もされずに画面に現れてます。
回答1件
あなたの回答
tips
プレビュー