Note that there are some explanatory texts on larger screens.

plurals
  1. POIllegal nesting with SASS everytime
    text
    copied!<p>I’m trying to create my own website and I’m using Nanoc. I’m also writing my files in HAML and SASS. <br>When I’m writing into my SASS file, I always have the error </p> <pre><code>Haml::SyntaxError: Illegal nesting: nesting within plain text is illegal </code></pre> <p>when I compile (<code>nanoc compile</code>). <br> My sass files are in <code>/content/css</code> and I would like they go in <code>/output/css</code> <br><br>The thing I don’t understand is that if I put spaces or if I put a tab, it doesn’t compile. The only thing which works is when I don’t put any spaces or tabs. It compiles but the CSS in output doesn’t work. <br> I looked here before : <a href="https://groups.google.com/forum/#!topic/nanoc/UI4VccZCDD4" rel="nofollow">https://groups.google.com/forum/#!topic/nanoc/UI4VccZCDD4</a> but it doesn't correct my compilation error. <br> <br>I let my <code>style.sass</code> file and my <code>Rules</code> file below.</p> <p>What is causing this issue and how can I resolve it?</p> <pre><code>div.title width: 80% background-color: #b7b8b2 </code></pre> <p>If I put no spaces before <code>width</code> and <code>background</code>, it compiles but doesn't work.</p> <pre><code>#!/usr/bin/env ruby require 'compass' Compass.add_project_configuration 'config.rb' # when using Compass 0.10 ### Compile rules compile '/content/css/*' do filter :sass, Compass.sass_engine_options # add the second parameter for Compass end compile '*' do if item.binary? # don’t filter binary items else filter :haml layout 'default' end end ### Route rules route '/content/css/*' do #'/style.css' # item.identifier.chop + '.css' #so that the /content/stylesheet.sass item is compiled in sass unless item.identifier.start_with?('/content/css/_') # for partials item.identifier.gsub(/\/$/, '') + '.css' end end route '*' do if item.binary? # Write item with identifier /foo/ to /foo.ext item.identifier.chop + '.' + item[:extension] else # Write item with identifier /foo/ to /foo/index.html item.identifier + 'index.html' end end ### Layout rules layout '*', :haml </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload