Skip to content

Instantly share code, notes, and snippets.

@LucasLevino
Last active March 30, 2021 15:38
Show Gist options
  • Save LucasLevino/4eface869f4ad6074cb9c41068c4c3b8 to your computer and use it in GitHub Desktop.
Save LucasLevino/4eface869f4ad6074cb9c41068c4c3b8 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
@function font($tag: p, $size: 15, $scale: 1.333) {
@if($tag == p or $tag == h4 ){
$result: $size;
@return #{ceil($result)}px;
} @else if($tag == h3 or $tag == h5) {
$result: $size * $scale;
@return #{ceil($result)}px;
} @else if($tag == h2) {
$result: $size * $scale * $scale;
@return #{ceil($result)}px;
} @else if($tag == h1) {
$result: $size * $scale * $scale * $scale;
@return #{ceil($result)}px;
} @else {
$result: $size;
@return #{ceil($result)}px;
}
}
@for $i from 1 through 5 {
h#{$i} {
font-size: font(h#{$i});
line-height: 1.7;
}
}
h1 {
font-size: 36px;
line-height: 1.7;
}
h2 {
font-size: 27px;
line-height: 1.7;
}
h3 {
font-size: 20px;
line-height: 1.7;
}
h4 {
font-size: 15px;
line-height: 1.7;
}
h5 {
font-size: 20px;
line-height: 1.7;
}
{
"sass": {
"compiler": "libsass/3.5.5",
"extensions": {},
"syntax": "SCSS",
"outputStyle": "expanded"
},
"autoprefixer": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment