Skip to content

Instantly share code, notes, and snippets.

@mbrowne
Created May 30, 2013 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbrowne/5677781 to your computer and use it in GitHub Desktop.
Save mbrowne/5677781 to your computer and use it in GitHub Desktop.
Standard gutter
/* Put a standard gutter on these common elements, as well as any element with the std-gutter class.
This makes it possible to have a standard gutter compatible with IE<=7 without needing to wrap every
grid cell with <div class="cell"> (as is done in the Cascade Framework examples)
*/
.std-gutter, .panel, .media, h1, h2, h3, h4, h5, h6, dl, p, blockquote, table, address, pre, figure {margin:15px;}
/* since we're applying a standard margin, list-style-position:inside is needed to keep lists
in alignment with everything else */
ul, ol {list-style-position:inside;}
ul {margin:0 0 9px 2.4em}
ol {margin:0 0 9px 2em}
/* immediate children of .std-gutter elements shouldn't have margins by default
because if the .std-gutter element has children, the intent is probably not to have the margin
applied again for child elements like h3, p, etc. listed above.
To override this, those child elements can simply be assigned the .std-gutter class as well */
.std-gutter > * {margin:inherit;}
.std-gutter > .col {margin:0;}
.std-gutter > .std-gutter {margin:15px;}
.no-gutter {margin:0 !important;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment