Skip to content

Overriding Constants

chriseppstein edited this page Sep 13, 2010 · 6 revisions

Sass provides a way of setting a variable using “conditional assignment”. This is useful for initializing constants with a value unless they are already set. Compass uses conditional assignment for all configurable constants.

To override a compass default value for any constant create a stylesheet named _base.sass and import it before importing any compass libraries into your stylesheet. In your base stylesheet, you can now define values for configurable constants.

Example

_base.sass


!blueprint_grid_columns = 32

screen.sass


@import base.sass, blueprint/modules/grid.sass

#header
  +column(32)
Clone this wiki locally