Last Updated: February 25, 2016
· ldavisrobeson
Twitter robeson

Modified Compass / Sass config file with an extra Dev environment option

The "dev_min" option provides source map generation and expanded CSS but excludes the crazy debug info that makes version control messy during the initial theming process.

# Compass / Sass config file
# This file is only needed for Compass/Sass integration. If you are not using
# Compass, you may safely ignore or delete this file.
# All config options: http://compass-style.org/help/tutorials/configuration-reference

# Change this to :production when ready to deploy the CSS to the live server.
# dev_max: full debug info (not ideal if committing CSS to a code repo)
# dev_min: source maps and expanded CSS (good for theming in progress)
# production: compressed CSS with no debug info
environment = :dev_min

# Location of the theme's resources.
css_dir = "css"
fonts_dir = "css/fonts"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "js"

# Require any additional compass plugins installed on your system.
require 'compass'
require 'breakpoint'
require 'sass-globbing'
require 'singularitygs'
require 'singularity-extras'

# You probably don't need to edit anything below this.

# enable Sass source maps to make live edits in browser
sourcemap = (environment == :dev_max || :dev_min) ? true : false

# You can select your preferred output style here (can be overridden via the
# command line):
output_style = (environment == :dev_max || :dev_min) ? :expanded : :compressed

# Show debugging comments during development.
line_comments = (environment == :dev_max) ? true : false

# Show debug information / partial location for FireSass and similar tools.
# Uncomment to enable.
debug = (environment == :dev_max) ? true : false

# Output debugging info in development mode.
sass_options = (environment == :dev_max && debug == true) ? {:debug_info => true} : {}

# To enable relative paths to assets via compass helper functions. Since Drupal
# themes can be installed in multiple locations, we don't need to worry about
# the absolute path to the theme from the server root.
relative_assets = true

# Increased decimal precision.
# 33.33333% instead of 33.333%
Sass::Script::Number.precision = 5

# Disable cache busting on image assets.
asset_cache_buster :none
Say Thanks