mobify / vellum

Default project styles for a mobile-first AdaptiveJS build.
MIT License
5 stars 0 forks source link

Resolve default line-heights #43

Closed jeffkamo closed 10 years ago

jeffkamo commented 10 years ago

Now that we have the $v-space variable, line-height should not be of pixel values.

Additionally, this value should probably be replaced with the $line-height variable.

ry5n commented 10 years ago

Wouldn’t that make line-height relative to the font-size of the element to which it’s applied? Doesn’t $line-height represent the base line-height as a fixed value, on which we can depend (AKA vertical rhythm)?

In the case of that heading, I think the goal is to use a line-height that isn’t the default. We could set it as a multiple of $line-height instead, maybe.

jeffkamo commented 10 years ago

Vertical rythme is so difficult on the web. If that's a legitimate concern then we'll probably have to be a bit more granular on how we set our line-heights and spacing – at the very least, those set on headings since they vary in size so much.

ry5n commented 10 years ago

It’s totally true that trying to do a strict baseline grid is a fool’s errand. I wasn’t advocating for that in a strict sense. After thinking about this I realized that in the past I used both a fixed value ($line-height) and a ratio as you’re proposing. So I’d always set my line-height on html with a unitless value, and I’d have that stored in a variable called $leading-ratio. That’s almost the only thing I used it for. In situations where I needed a different ratio (say headings, where typically you want less leading) I’d dial that in with a straight-up value.

So I guess you’re right: with $v-space, we could switch $line-height to a ratio. If we do, I think it should be named to indicate that, along the lines of $leading-ratio or $line-height-ratio.

ry5n commented 10 years ago

I wouldn’t mind having both, TBH: $line-height and $leading-ratio.

jeffkamo commented 10 years ago

Ya I like the sound of having both. Let's go with that.