Browse files

add support for direction and legacy support in ie to inline-block-li…

…st-item
  • Loading branch information...
1 parent 6ec0fd1 commit 1e8c1a4adb2a2f21e4a7778feb40cada223c19a4 @edwardoriordan committed Mar 6, 2013
Showing with 6 additions and 8 deletions.
  1. +6 −8 frameworks/compass/stylesheets/compass/typography/lists/_inline-block-list.scss
View
14 frameworks/compass/stylesheets/compass/typography/lists/_inline-block-list.scss
@@ -45,22 +45,20 @@
// Can be mixed into any li selector that is meant to participate in a horizontal layout.
// Used to implement `inline-block-list`.
-@mixin inline-block-list-item($padding: false) {
+@mixin inline-block-list-item($padding: false, $direction: left) {
@include no-bullet;
@include inline-block;
white-space: nowrap;
@if $padding {
padding: {
left: $padding;
right: $padding;
- };
+ };
+ &:first-child #{if($legacy-support-for-ie6, ', &.first', '')} { padding-#{$direction}: 0; }
+ &:last-child { padding-#{opposite-position($direction)}: 0; }
+ @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
+ &.last { padding-#{opposite-position($direction)}: 0; } }
}
- // Not sure if we need to set these based on the direction
- // since we can't set the direction of the list like we
- // can when they are floated?
- &:first-child, &.first { padding-left: 0; }
- &:last-child { padding-right: 0; }
- &.last { padding-left: 0; }
}
// A list(ol,ul) that is layed out such that the elements are inline-block and won't wrap.

0 comments on commit 1e8c1a4

Please sign in to comment.