Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Use the mixin that lets us set a new font-size???!!! HALP!

Challenge task 3 of 5

Using the mixin that lets us set a new font-size for an element, set the h1 font size to 48px and h2 font size to 36px.

Can not figure this out at all.

4 Answers

The mixin can be found here: http://compass-style.org/reference/compass/typography/vertical_rhythm/.

Reading the descriptions on that page, the one that looks like it will accomplish the task is the adjust-font-size-to mixin.

This worked for me:

// Imports
@import "compass/typography";

// Variables
$base-font-size: 16px;
$base-line-height: 24px;
@include establish-baseline;

// Page Styles
h1 {
    @include adjust-font-size-to(48px);
}

h2 {
    @include adjust-font-size-to(36px);
}

Hi, Justin Ranton: Can you send me a link to what challenge you're referring to?

Hi, Kevin Lozandier . Thanks for helping. http://teamtreehouse.com/library/compass-typography challenge 3 of 5

Hi, Justin Ranton:

Kristen Law is correct; do note that mixins such as trailer must now be aware of the new font-size if you want the baseline to be outputted correctly for the element you've applied adjust-font-size-to with a different value than$base-font-size`