chriseppstein/compass — pull request #778 by JohnAlbin (2012-03-13 09:57:12+00:00)
Title: Rename $leader variable in vertical_rhythm's leader() and trailer() mixins

`trailer()` appears to be a near copy-and-paste of `leader()`. Here it is:

@mixin leader($lines: 1, $font-size: $base-font-size, $property: margin) {
$leader: rhythm($lines, $font-size);
@if unit($leader) == px {
$leader: floor($leader)
}
#{$property}-top: $leader;
}

But the internal variable `$leader` makes no sense inside `trailer()`. “WTF? Why is there a `$leader` variable inside the `trailer()` mixin?”

If we rename this variable to `$whitespace`, it makes sense in both mixins.

Alternatives:

1. we could just rename the `$leader` variable inside the `trailer()` to be `$trailer`.
2. we could write a `whitespace()` helper mixin that has a `$direction` parameter. And use that internally.

I actually prefer alternative #2 over the commit in this pull request, but it's a bit more radical of a change.