kyleshevlin / shevy

Configurable Vertical Rhythm & Typography for Sass
http://kyleshevlin.github.io/shevy/
MIT License
181 stars 14 forks source link

unclear docs: base-spacing and line-height-spacing #11

Closed ha404 closed 6 years ago

ha404 commented 6 years ago

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 using line-height-spacing as it doesn't buy me the magic of calculating proximity. Can there be an example use case for preferring to use line-height-spacing?

kyleshevlin commented 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.

ha404 commented 6 years ago

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!

kyleshevlin commented 6 years ago

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.

ha404 commented 6 years ago

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!