Closed ha404 closed 6 years ago
The "magic" is described in the docs. base-spacing
is lineHeightSpacing() * proximityFactor
. If proximity
is false, then line-height-spacing
and base-spacing
are the same.
You could use line-height-spacing
if you were interested in using something that strictly followed your base-spacing
variable and purposefully disobeyed proximity
.
Yeah, I think I just can't think of an instance where I wanted to disobey proximity
. Would disobeying proximity
mess up the vertical rhythm at all–what are the benefits/drawbacks? Thanks!
I don't know of any benefits or drawbacks. In truth, it was a simple helper function that was available because of how the API was written. It didn't hurt anything to make it public, so I did.
I use base-spacing
for things like margins and paddings. Perhaps there is a situation where padding something on the sides using lineHeightSpacing
makes more sense, like a button or something.
These are tools I hand over to you, the developer, to do with as you please. I have no preconceived notion of how you should use them, and thus I have no examples.
Gotcha, I appreciate it! I guess I'm in the camp where less is more to avoid confusion. I really love this tool and I just want to use it properly. Thanks!
I understand there's magic behind using
base-spacing
which I prefer just using exclusively for spacing. I don't know when I should be usingline-height-spacing
as it doesn't buy me the magic of calculating proximity. Can there be an example use case for preferring to useline-height-spacing
?