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
Mo Daka
Courses Plus Student 10,363 PointsUse 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
Kristen Law
16,244 PointsThe 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);
}
Kevin Lozandier
Courses Plus Student 53,747 PointsHi, Justin Ranton: Can you send me a link to what challenge you're referring to?
Mo Daka
Courses Plus Student 10,363 PointsHi, Kevin Lozandier . Thanks for helping. http://teamtreehouse.com/library/compass-typography challenge 3 of 5
Kevin Lozandier
Courses Plus Student 53,747 PointsHi, 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`