Option for horizontal-list to skip padding.

This commit is contained in:
Andrew Vit 2010-09-14 17:31:19 -07:00 committed by Chris Eppstein
parent 4820676d3a
commit af72d2251f
2 changed files with 14 additions and 7 deletions

View File

@ -13,6 +13,8 @@ COMPASS CHANGELOG
* HTML5 reset includes box-model reset for newer browsers. * HTML5 reset includes box-model reset for newer browsers.
* Fix encoding issue for ruby 1.9 users of the font-face mixin. * Fix encoding issue for ruby 1.9 users of the font-face mixin.
* Make it easier to disable the asset cache buster: `asset_cache_buster :none` * Make it easier to disable the asset cache buster: `asset_cache_buster :none`
* Can now set `$padding` to `false` to make the `horizontal-list` mixin skip the
padding properties.
0.10.5 (08/29/2010) 0.10.5 (08/29/2010)
------------------- -------------------

View File

@ -31,21 +31,26 @@
// //
// :last-child is not fully supported // :last-child is not fully supported
// see http://www.quirksmode.org/css/contents.html#t29 for the support matrix // see http://www.quirksmode.org/css/contents.html#t29 for the support matrix
//
// Setting `$padding` to `false` disables the padding between list elements
@mixin horizontal-list-item($padding: 4px, $direction: left) { @mixin horizontal-list-item($padding: 4px, $direction: left) {
@include no-bullet; @include no-bullet;
white-space: nowrap; white-space: nowrap;
@include float($direction); @include float($direction);
padding: { @if $padding {
left: $padding; padding: {
right: $padding; left: $padding;
}; right: $padding;
&:first-child, &.first { padding-#{$direction}: 0px; } }
&:last-child, &.last { padding-#{opposite-position($direction)}: 0px; } &:first-child, &.first { padding-#{$direction}: 0; }
&:last-child, &.last { padding-#{opposite-position($direction)}: 0; }
}
} }
// A list(ol,ul) that is layed out such that the elements are floated left and won't wrap. // A list(ol,ul) that is layed out such that the elements are floated left and won't wrap.
// This is not an inline list. // This is not an inline list.
//
// Setting `$padding` to `false` disables the padding between list elements
@mixin horizontal-list($padding: 4px, $direction: left) { @mixin horizontal-list($padding: 4px, $direction: left) {
@include horizontal-list-container; @include horizontal-list-container;
li { li {