Skip to content
The Sass Way to recreate Smashing Magazine's layout (circa 2009)
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
stylesheets
.gitignore
Gemfile
Gemfile.lock
README.mdown
Rakefile
smashing-layout.gemspec

README.mdown

Smashing Layout

The Sass Way to recreate Smashing Magazine's layout (circa 2009).

Installation

gem install smashing-layout

Add require 'smashing-layout' to your Compass config file.

Usage

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

The smashing-layout mixin

The smashing-layout mixin sets up 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
$max-width: 1200px
$min-width: 900px

This assumes the following markup structure to create the layout.

#your-id
  .max-width
    .min-width
      .padding
        .primary.column
           ...
        .secondary.column
           ...

The smashing-width mixin

The smashing-width mixin sets up 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 areas where you've used the smashing-layout mixin.

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

#your-id
  .max-width
    .min-width
      ...

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.

Something went wrong with that request. Please try again.