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
$smashing-direction: right
$smashing-max-width: 1200px
$smashing-min-width: 900px
$smashing-support-ie6: false
The following markup structure is needed to create the Smashing Layout.
#your-id
.max-width
.padding
.primary.column
...
.secondary.column
...
If you have set the variable $smashing-support-ie6
to true
(set to false
by default), the following markup structure is needed to create the Smashing 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.