CORE CONCEPTS

CORE CONCEPTS

New

Intro to Style Panel

Intro to Style Panel

New

3:15

HTML Tags

HTML Tags

New

3:59

Classes

Classes

New

2:46

Combo Classes

Combo Classes

New

4:05

Style Manager

Style Manager

New

1:56

Text Style Inheritance

Text Style Inheritance

New

3:18

Interaction

Interaction

New

States

States

New

2:47

Transitions

Transitions

New

2:40

Responsive Design

Responsive Design

New

Intro to Responsive Design

Intro to Responsive Design

New

2:21

Intro to Breakpoints

Intro to Breakpoints

New

16:00

16:00

Styling Across Breakpoints

Styling Across Breakpoints

New

Typography Styles

Typography Styles

New

Intro to Web Typography

Intro to Web Typography

New

3:20

Advanced Typography Styles

Advanced Typography Styles

New

3:01

Typography Units

Typography Units

New

2:43

Line Height

Line Height

New

1:38

Text Shadow

Text Shadow

New

2:36

Background & Border Styles

Background & Border Styles

New

Background Styles Overview

Background Styles Overview

New

2:20

Background Image

Background Image

New

2:04

Background Gradient

Background Gradient

New

3:02

Border

Border

New

3:07

Border Radius

Border Radius

New

3:22

Box Shadow

Box Shadow

New

3:34

3D Styles

3D Styles

New

Intro to 3D

Intro to 3D

New

2:25

3D Perspective

3D Perspective

New

4:01

2D & 3D Transforms

2D & 3D Transforms

New

4:53

Effects

Effects

New

Opacity

Opacity

New

1:44

Filters

Filters

New

2:59

Cursors

Cursors

New

1:45

Color

Color

New

Color Picker & Swatches

Color Picker & Swatches

New

3:51

Color Values

Color Values

New

3:22

new course
CSS grid landing page tutorial (36min)

Lesson info

Lesson info

Line height is the ver­ti­cal space be­tween lines of text, which is called "leading" in print design. You can use different units for line height to make it scale automatically with the font size, or be independent of the font size.

In this video, we’ll cover:

  1. ‍Editing line height
  2. ‍Using relative units
  3. ‍Using fixed units

Explore this project

Want to dig into the project featured in this video and see how everything is put together? We've included the full project we used when making this lesson, and we've shared the link right under this very paragraph.

View and clone this projectDownload lesson assets
Clone this projectDownload project assets

Transcript

Setting the line height of text-based content is really important, if for no other reason than to prevent those who are looking at your content from being greeted with an illegible dumpster fire.

Two main types of line heights we're going to cover: number...and fixed.

Number — what's essentially a unitless number is usually the preferred way to go. It's essentially a multiplier. That is: if your font size is 30 pixels and you set this to 1 (you can choose unitless by selecting it from the dropdown), the line height is 30 pixels.  30 pixel font size, line height of 1, that's a 30-pixel line height. Set it to 1.2, now it's 36 pixels.

And because of this multiplying property, you don't have to change the line height when you change the font size. Because it's dependent on the font size, it scales automatically.

Now, if you've designed and developed using percentages before, there are actually inheritance issues that can crop up. There's tons of documentation on this, but the short version is: unitless numbers are usually preferred over percentages.

The second type of line height is fixed. The most common representation here is in pixels.  This is actually the default and it works great, as well. You can simply type in a value, and the line height is updated.

Now for pixels, or unitless numbers, you can of course use the up and down arrows on the keyboard to adjust, and you can hold shift while doing the same thing to make more rapid changes.

In addition to pixels, if you're keeping track of inheritance, you can use ems — or you can even use rems in this field. Just like font size, sometimes the best way to get comfortable with line heights and these units is to directly visualize the result on the Canvas.

And that's...line height.