Scaffold provides integration between Drupal and the CSS Scaffold library by Anthony Short.

This module lets themers use the Scaffold framework to write their theme's CSS. Scaffold is a modern CSS framework in the spirit of LESS and SASS based on PHP that allows use of mixins, constants, functions, and grids.


  • Constants / variables can be set through the UI to easily customize the theme.
  • Compatible with base themes.
  • API to add Scaffold stylesheets through a function : scaffold_add_css().
  • Ability to add Scaffold stylesheets from the .info file of the theme.
  • Ability to call Scaffold files through an URL.
  • Compatible with the libraries module.
  • Displays parsing errors.
  • Works with Drupal aggregation.
  • Hooks to provide custom extensions (2.x branch).



  • Download and extract Scaffold from location matching your branch (see above).
  • 1.x : Use the "scaffold" subfolder.
  • 2.x : Rename the extracted folder as "scaffold".
  • If you have the libraries module installed, put the "scaffold" folder in sites/all/libraries, otherwise put it directly in the scaffold module folder. Be aware that the Scaffold repository location is likely to change.
  • Install & enable the module.


  • To add a Scaffold stylesheet to your theme, just add your stylesheets to the .info file as below :
    scaffold[all][] = style.css
    scaffold[print][] = print.css
  • To add a Scaffold stylesheet from code, use the provided scaffold_add_css() function :
    scaffold_add_css($path, $type, $media, $preprocess);
  • You can also call a Scaffold stylesheet from an url (useful for IE conditional stylesheets) :
    <link type="text/css" rel="stylesheet" media="all" href="'. base_path() .'scaffold/'. path_to_theme() .'/ie-fix.css" />


Additional hooks are provided to add configurable constants / variables and, for the 2.x branch, custom extensions. See the README.txt file for more information on these hooks.

Sponsored by

Project Information