
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
A Sass project that began as an experiment to recreate Smashing Magazine's layout (circa 2009).
(sudo) gem install smashing-layout
Add require 'smashing-layout'
to your Compass config file.
There are two mixins that produce all the magic in Smashing Layout. The smashing-layout
mixin and the smashing-width
mixin. I'll cover those in more detail below. But in the meantime, here are the details for the default variables and how to override them.
The smashing-layout
mixin sets up the core layout based on the default variable configuration or your overrides.
The default configuration of Smashing Layout is listed below. If you plan to override any of these values, do so prior to importing smashing-layout.
// Configuration
$smashing-direction: right
$smashing-max-width: 1200px
$smashing-min-width: 960px
$smashing-cushion: 2.5%
$smashing-devine: false
Import Smashing Layout from the extension, like so:
@import smashing-layout
A proper example of overriding the default variables would look something like this.
The code below assumes you are keeping the default max and min width, but you'd like to set the sidebar to display on the left vs the default setting of displaying on the right. It also assumes you'd like a bit more cushion on the outside of the layout by setting the $smashing-cushion
, and sets the left and right padding on the .width
selector to 5% each vs the default of 2.5%.
// Configuration
$smashing-direction: left
$smashing-cushion: 5%
@import smashing-layout
The following markup and selector structure is assumed to create the two-column Smashing Layout.
.your-class
.width
.padding
.primary
...
.secondary
...
I realize this means you are using more presentational selector names in your markup, but that doesn't mean you can't combine those class names with HTML5 elements.
There are two mixins to use when using Smashing Layout.
smashing-layout
, which takes care of creating the layoutsmashing-width
, which sets up just the width for keeping sections of the design outside the layout the same flexible widthsmashing-layout
Assumes the following markup and selector structure to work.
.your-class
.width
.padding
.primary
...
.secondary
...
smashing-width
Assumes the following markup and selector structure to work.
.your-class
.width
...
Copyright (c) 2009-2011 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.
FAQs
Unknown package
We found that smashing-layout demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.