Sizing our headings
Let's move on to adjusting our headings font sizes, and then we'll move away from vertical rhythm. To adjust our heading sizes, we'll need to let Compass know we want to adjust their size in relation to the vertical rhythm we've defined. For this, we use the adjust-font-size-to
mixin.
We'll also want to use the default heading sizes from the last chapter. However, this time we'll be multiplying them by our $base-font-size
variable in order to get the pixel value. Remember, Compass uses pixels in all of its vertical rhythm mixins. So let's create a list with our heading sizes so we can loop through it to create our headings:
// mastering-sass/ch03/scss/screen.scss $base-heading-sizes: (2, 1.5, 1.17, 1, 0.83, 0.67);
Now we can ...
Get Mastering Sass now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.