Smashing Layout

A Sass experiment to recreate Smashing Magazine's layout (circa 2009) turned Compass extension.

Installation

You will need to install this to your specified Compass extensions directory. See the Compass documentation on extensions for more details: http://compass-style.org/docs/tutorials/extensions/

Usage

There are two mixins that produce all the magic in Smashing Layout.

+smashing-layout

The +smashing-layout mixin setups the core layout based on the default variable configuration or your overrides.

Here is the default configuration of Smashing Layout. If you plan to override this, be sure to do so above the import of smashing-layout.

// Configuration
$direction: right !default
$max-width: 1400px !default
$min-width: 1250px !default

This assumes the following markup structure to create the layout.

<div id="your-id">
  <div class="max-width">
    <div class="min-width">
      <div class="padding">
        <div class="primary column">
          ...
        </div>
        <div class="secondary column">
          ...
        </div>
      </div>
    </div>
  </div>
</div>

+smashing-width

The +smashing-width mixin setups the just the width with no columns based on the default variable configuration or your overrides. This is needed for headers and footers and other parts of your layout that need to be set to the same width as your main content area that you've applied +smashing-layout to.

This assumes the following markup structure to apply the smashing-width.

<div id="your-id">
  <div class="max-width">
    <div class="min-width">
      ...
    </div>
  </div>
</div>

License

Copyright (c) 2009 Adam Stacoviak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.