Skip to content

Instantly share code, notes, and snippets.

@babsgosgens
Created July 21, 2014 10:40
Show Gist options
  • Save babsgosgens/ee5c1bfbdc0fa609b2af to your computer and use it in GitHub Desktop.
Save babsgosgens/ee5c1bfbdc0fa609b2af to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div>
<ul>
<li>When line-height is set in percentage, changing the font-size of child elements will not change the computed value of the line-height for that element.</li>
<li>When the line-height is set in numbers, the line-height of child elements will be computed against that elements font-size.</li>
</ul>
<p>Yeah, I like animals better than people sometimes... Especially dogs. Dogs are the best. Every time you come home, they act like they haven't seen you in a year. And the good thing about dogs... is they got different dogs for different people. Like pit bulls. The dog of dogs. Pit bull can be the right man's best friend... or the wrong man's worst enemy. You going to give me a dog for a pet, give me a pit bull. Give me... Raoul. Right, Omar? Give me Raoul.</p>
</div>
// ----
// Sass (v3.4.0.rc.1)
// Compass (v1.0.0.alpha.20)
// ----
html {
font-size: 100%;
line-height: 160%;
font-family: sans-serif;
}
p {
line-height: 1;
}
p {
// font-size: 16px;
// line-height: 150%;
// font: normal normal 1.5rem/2rem arial;
}
html {
font-size: 100%;
line-height: 160%;
font-family: sans-serif;
}
p {
line-height: 1;
}
<div>
<ul>
<li>When line-height is set in percentage, changing the font-size of child elements will not change the computed value of the line-height for that element.</li>
<li>When the line-height is set in numbers, the line-height of child elements will be computed against that elements font-size.</li>
</ul>
<p>Yeah, I like animals better than people sometimes... Especially dogs. Dogs are the best. Every time you come home, they act like they haven't seen you in a year. And the good thing about dogs... is they got different dogs for different people. Like pit bulls. The dog of dogs. Pit bull can be the right man's best friend... or the wrong man's worst enemy. You going to give me a dog for a pet, give me a pit bull. Give me... Raoul. Right, Omar? Give me Raoul.</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment