list: floated

view source

De-style a list and float its items.

use-name
scut-list-floated
type
mixin, with default-values placeholder
arguments
  1. $space
    default
    false

    Spacing to separate the floated list items.

  2. $dir
    default
    left

    The float direction.

  3. $no-margin
    default
    true

    If true, top and bottom margins will be removed from the list.

Float items to the left or to the right, with or without spacing between them.

Use a floated list instead of an inline list (see scut-list-inline) when you want your list items snuggled right next to each other.

Only the list's immediate children are floated (ul > li): Scut does not presume to know what you might plan to do with sub-lists.

example

SCSS

.eg-list-floated-1 {
  @include scut-list-floated;
  // or @extend %scut-list-floated;
}
.eg-list-floated-2 {
  @include scut-list-floated(1em, $no-margin: false);
}
.eg-list-floated-3 {
  @include scut-list-floated(2em, right);
}

Result

  • list item 1
  • list item 2
  • list item 3
  • list item 1
  • list item 2
  • list item 3
  • list item 1
  • list item 2
  • list item 3