Last updated 22 December 2016. Created on 23 January 2013.
Edited by arshadcn, barraponto, erok415, figtree_development. Log in to edit this page.

The documentation for Radix has been moved to http://docs.radixtheme.org.

This simple guide will help you get started with theming using Radix.

Step 1: Create a Radix subtheme

Option A: Create a subtheme using Drush (Recommended)

  1. Make sure you have drush 5.x or newer installed.
  2. Download the latest radix: drush dl radix; drush cc all;
  3. Create a subtheme: drush radix "My Subtheme"

If you want to use a Bootswatch theme, you can use drush radix "My Subtheme" --bootswatch=NAME_OF_BOOTSWATCH_THEME..

To see more options available run drush radix --help.

Option B: Create a subtheme manually

  1. Get the latest Radix
  2. Copy the default kit and place it in your themes directory.
  3. Rename default to YOUR_THEME_NAME.
  4. Rename default.info to YOUR_THEME_NAME.info
  5. Edit YOUR_THEME_NAME.info. Add a name, description and comment out the line hidden: true.
  6. Open both template.php and theme-settings.php and change every occurrence of {{machine_name}} to YOUR_THEME_NAME.

Step 2: Styling with Sass

  1. Using a terminal, cd to the root of your subtheme and run the following command: bundle. Install bundler if you don't have it on your machine. http://bundler.io/
  2. When bundler successfully completes, run the following command to watch for changes: bundle exec compass watch.
  3. You are now ready to start making Sass changes at /assets/sass/:
    In your theme folder, you will find a _variable.scss partial under assets/sass/global/. This file holds all the SASS variables used in the theme. You can customize your theme colors and config from there.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

PMorris’s picture

I just downloaded the latest Radix but I don't see radix_starter anywhere. I'm trying to do it manually without drush. Is that possible?

arshadcn’s picture

I've updated the documentation.

Arshad Chummun
projects | twitter

erok415’s picture

I've followed your instructions and can't create a subtheme.

$ drush --version
drush version 5.0-dev

$ drush
Other commands...etc
Among others, radix is shown in the list of other commands.

Each time: $ drush radix [subthemeName] is run, The drush command 'radix' could not be found. is returned.

Yes, I've run both $ drush cc all | and | $drush cc drush

Please note that this is on a Pantheon site that has been git clone to my local. There isn't a db hooked up locally as this is a Pantheon site.

Please note that I have installed compass_radix as a gem and have git cloned the compass_radix to the extensions directory inside of the radix theme. With or without the radix/extensions/compass_radix directory, $drush radix does not work.

Ain't it great....!

arshadcn’s picture

There isn't a db hooked up locally as this is a Pantheon site..

You need to make the db connection to make drush work.

Arshad Chummun
projects | twitter

erok415’s picture

Are you saying it's not possible to use $ drush @pantheon.[projectName].dev radix "[themeName]" either? Because that also doesn't work. How do you make the db connection for instances like this?

May I ask how you've subthemed using Pantheon? I can only assume that you've manually subthemed Radix as this currently seems to be the only way to create a subtheme if $ drush radix "[mythemeName]" doesn't work.
E.

PS. Thanks for the help.

Ain't it great....!

PMorris’s picture

At the risk of sounding like a me too post, I have the same problem when I try to create a new subtheme. "The Drush command could not be found' Yet I see that radix is listed in the drush help file.

I'm using drush 6.2.0 and MAMP so I have a local database. I didn't have any problems making a subtheme when I was using alpha2 but It's been a couple months so my memory of how I got it to work is a bit foggy. Is it something to do with new version?

PMorris’s picture

I think it was something to do with me being on OS X Mavericks and a recent reinstall of my operating system wiping out some of my drush settings. The solution I found to get drush working again was to run drush as integrated php:

sudo nano ~/.bash_profile
alias drush='/Applications/MAMP/bin/php/php5.3.6/bin/php /usr/lib/php/pear/drush/drush.php'

See this thread:

http://drupal.stackexchange.com/questions/98802/drush-does-not-work-on-my-mac

tikifez’s picture

I'm attempting to make a radix subtheme, but I'm getting the following error.

Syntax error: File to import not found or unreadable: bootstrap.
	Load paths:
			/var/www/sites/all/themes/[subtheme]/assets/sass
			/var/lib/gems/1.8/gems/compass-0.12.5/frameworks/blueprint/stylesheets
			/var/lib/gems/1.8/gems/compass-0.12.5/frameworks/compass/stylesheets
			/var/lib/gems/1.8/gems/compass_twitter_bootstrap-2.3.1/stylesheets
			/var/lib/gems/1.8/gems/compass_radix-3.0.3/stylesheets
			Compass::SpriteImporter
	on line 17 of /var/lib/gems/1.8/gems/compass_radix-3.0.3stylesheets/_compass_radix.scss
	from line 19 of /var/www/sites/all/themes/[subtheme]/assets/sass/screen.scss

config.rb

require "compass_twitter_bootstrap";
require "compass_radix";

environment = :development

http_path = "/"
css_dir = "assets/stylesheets"
sass_dir = "assets/sass"
images_dir = "assets/images"
fonts_dir = "assets/fonts"
javascripts_dir = "assets/javascripts"

output_style = (environment == :development) ? :expanded : :expanded
relative_assets = true
line_comments = (environment == :development) ? true : false

Gemfile

# Dependencies
gem "compass_twitter_bootstrap"
gem "sass-rails', '~> 3.2"
gem 'bootstrap-sass', '3.0.2.1'

 source "http://rubygems.org"

Any thoughts?

ethanhinson’s picture

I had the same problem and the following fixed it for me:

If you don't have the bootstrap-sass gem installed, do that first.
$ sudo gem install bootstrap-sass

Then just add the following to config.rb before the compass_radix stuff:
require "bootstrap-sass";

However, it did uncover another issue with compass_radix_responsive import line. I got the following error when I import that file:

>>> Change detected at 11:54:46 to: ie7.scss
   create assets/stylesheets/ie7.css 
   create assets/stylesheets/ie8.css 
   create assets/stylesheets/print.css 
   <strong> error assets/sass/screen.scss (Line 20: File to import not found or unreadable: compass_radix_responsive.</strong>

UPDATE:

Using sudo for compass clean && compass watch fixes the compass_radix_responsive import issue.

$ sudo compass clean && sudo compass watch
   remove .sass-cache/ 
   remove assets/stylesheets/ie7.css 
   remove assets/stylesheets/ie8.css 
   remove assets/stylesheets/print.css 
   remove assets/stylesheets/screen.css 
>>> Change detected at 12:33:04 to: ie7.scss
   create assets/stylesheets/ie7.css 
   create assets/stylesheets/ie8.css 
   create assets/stylesheets/print.css 
   create assets/stylesheets/screen.css 
>>> Compass is polling for changes. Press Ctrl-C to Stop.
>>> Change detected at 12:33:26 to: partials/_layout.scss
overwrite assets/stylesheets/screen.css 
>>> Change detected at 12:33:38 to: partials/_layout.scss
overwrite assets/stylesheets/screen.css 
Veshalen.R’s picture

Im having a problem with installing rubygems and compass radix, well basically it doesnt download either from a git command .... and since i want edit a subtheme i managed to create with the rest of the instructions, i get this error .....
"It looks like sites/all/themes/my_subtheme/assets/stylesheets/screen.css has not been created yet. Run compass watch in your theme directory to create it."
so thats where im at really ..

Chris Gillis’s picture

I followed the drush instructions and got a list of errors starting with
[error] Source directory /www/mysite.com.au//kits/default is not readable or does not exist.

No folder has been created.

trungonly’s picture

If you falled to
npm run setup

Please check if you can reach bower, event after installed it using:
npm install -g bower

Error:

$ bower
-bash: bower: command not found

Problem is the bower after installed we cannot reach it because of wrong PATH. Please set installation path first:
npm config set prefix /usr/local

Then install bower again.