I read on the site that sass can be used. How please ?


escoles’s picture

Instructions are here, but are cryptic at best:

Not made clear:

  • Compass requires Ruby
  • Sassy and Prepro modules are very, very poorly documented

So what we really need is a how-to for RIPPING SASS SUPPORT OUT of the theme. As-packaged, it's kind of useless.

Jeff Burnz’s picture

Regarding #1.

  1. SASS requires Ruby. Ruby can run on MS Windows, OSX and Linux.
  2. I have never recommended to use one of those PHP SASS processor modules.
  3. You do not have to use SASS, there are regular CSS files for those that don't use SASS.
  4. "Ripping SASS out" as you say would require deleting a few files - the /sass directory and the config.rb file, however leaving these in place would make no difference.

Reality is that a huge number of professional front end developers are now using either SASS or LESS, however its not my job to teach people how to use SASS, nor Compass. The technology is there for you to leverage if thats the way you like to work, if not, don't use it.

Like I said - there are regular CSS files for themers who just want to write normal CSS - there is no compulsion to use SASS at all.

SASS (and Less) are really breakthrough technologies for themers, they make complex things easy and save a lot of valuable time (this cannot be overstated, it saves an enormous amount of typing). Your assertion that it is "kind of useless" is really out of kilter with how most front end developers are working these days.

Installing both Ruby and Compass are easy (very easy) and getting SASS started requires just a few commands in the terminal, pretty basic stuff for most web developers. There are even GUI apps these days, although I have not tried any as yet.

If you need help using SASS then google it. At some stage I may make some vidoes to make this stuff more clear, as in how to use the config.rb in Adaptivetheme, basically to help new SASS uses get started, however the fact is that front enders with SASS experience know how to use it, if you learn SASS and Compass then you don't need any docs from me.

mrP’s picture

@escoles -- that's kind of like saying every module should give explicit instructions on how to configure a LAMP stack. because after all, modules require php...and well, that's just "not made clear".

If you look at the directory structure of 7.x-3.1, at_subtheme has a sass folder. This includes all of the starter files necessary for a Sass compiler (such as Compass) to generate the resultant css found in the at_subtheme/css directory. You can use Drush with AT or the old fashioned way to create your own sub-theme (which will also include the sass directory).

I don't believe Jeff has provided the Sass architecture for other AT subthemes, yet, but correct me if I'm wrong.

Adaptive Theme Sass Quickstart (using Compass)

  • Install rubygems: sudo apt-get install rubygems
  • Install SASS: sudo gem update; sudo gem install sass
  • Install Compass: sudo gem install compass
  • Get the latest adaptivetheme version: drush dl adaptivetheme
  • Create your sub-theme: drush adaptivetheme "Your Theme Name" yourthemename
  • cd to your sub-theme directory and run the following command: compass clean && compass watch
  • Visit Appearance in your Drupal admin and enable your new sub-theme
  • In your theme folder, you will find a _custom.scss partial under /sass. This file holds all the Sass variables used in the theme. You can customize your theme colors, fonts, etc. from there.
  • Get acquainted with Sass basics
Jeff Burnz’s picture

mrP, great guide there! Awesome.

I tested the Scout app (http://mhs.github.io/scout-app/) and actually it was excellent I thought, it loaded my config.rb configuration and correctly wrote all the stylesheets on save etc etc. Very strait forward for someone who does not want to touch Ruby or the command line.

Jeff Burnz’s picture

Status:Active» Fixed

There is also http://incident57.com/codekit/ which I have not tried and it costs some money, I hear its excellent.

Future versions of AT (read D8) may ship with an Assetic filter for compiling SCSS files, maybe.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.