I'm trying my hand at making a Drupal 8 theme using Omega 5 as a base theme.

I've made several successful Omega subthemes in Drupal 7 before. I have already created the sub-theme and activated it successfully through the Appearance window, but now I'm having trouble compiling the sass into css. I've searched haven't found any documentation on how to do this yet.

Usually I'd navigate to the "sass" folder in the theme directory using terminal and run "compass compile", but when I do that in "my sub-theme/style/scss" I get the following error:

"Compass can't find any Sass files to compile.
Is your compass configuration correct?.
If you're trying to start a new project, you have left off the directory argument.
Run "compass -h" to get help."

Does anyone know what I need to run in order to compile my sass? I'm not sure of the 'directory argument' compass is talking about.

Thanks in advance!

Comments

lauraxequals created an issue. See original summary.

steinmb’s picture

Assigned: lauramunro » Unassigned
Issue tags: -Sass, -scss, -compass, -compile, -subtheme
Anticosti’s picture

Same issue here

himerus’s picture

Okay, here's the deal...

In the current (alpha) version of Omega for D8, the only thing that is 100% controlled via the interface SCSS wise is the layout. When layout changes are made, the PHPSass library compiles the appropriate SCSS and CSS needed to convert those form variables to actual SCSS code.

Running compass watch would throw an error by default (currently) since there is no config.rb setup for the default subthemes.

The latest dev version has a few additional improvements, including the "SCSS Variables" vertical tab in the theme settings form with color and font options. Once this section is complete, there will be 'some' sort of automated recompiling of SCSS files in order to translate those variables into existing SCSS files. There may be (probably should be) an option so that either the PHPSass can compile them directly (default for non-tech users) OR only the custom variables file generated by those form options is rewritten, and then compass watch is expected to handle the actual recompile.

So, basically, what you are experiencing is expected currently. Before a solid beta version is released, there will be both a method to allow the interface to handle the recompile of ALL SCSS in the theme, and not just the layout SCSS as well as the ability to add compass support to newly generated subthemes.

I could also see this generic option to "choose compass or not" taking out the actually processing of the CSS for the layout, and letting compass rewrite that as well after the layout SCSS had been written/updated.

There's lots more to come on this front for sure. Please be patient, it is an alpha release, and a lot of features need to be refined, and still more added before the system is 100%.

steinmb’s picture

Status: Active » Fixed
lauramunro’s picture

Status: Fixed » Active

This isn't "fixed", as user himerus pointed out, it is a known problem with no solution at the moment:

"There's lots more to come on this front for sure. Please be patient, it is an alpha release, and a lot of features need to be refined, and still more added before the system is 100%."

steinmb’s picture

Title: Can't compile sass in sub-theme in Drupal 8? » Make sure sass sub-theme in Drupal 8 compile
Category: Support request » Task

If we want to keep this around, perhaps we should make it at task.

arkjoseph’s picture

One can also use Grunt or Gulp and completely disable the omega.gs layout configuration. Then you would have the freedom to use anything we have at our disposal such as compass, bourbon, neat, foundation....etc

lauramunro’s picture

Just checking in with this ticket, is any progress being made on this?

lauramunro’s picture

Hi everyone, we've fixed this in our own Drupal 8 theme - try it out and give us some feedback https://www.drupal.org/sandbox/thomasmurphy/2837871