The Sass Way to recreate Smashing Magazine's layout (circa 2009).
gem install smashing-layout
require 'smashing-layout' to your Compass config file.
There are two mixins that produce all the magic in Smashing Layout.
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 ...
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
This assumes the following markup structure to apply the smashing-width.
#your-id .max-width .min-width ...
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.