Skip to content

Instantly share code, notes, and snippets.

View GerardKetuma's full-sized avatar
🎯
Focusing

Gerard Ketuma GerardKetuma

🎯
Focusing
View GitHub Profile
@function em($target, $context: $base-font-size) {
@if $target == 0 { @return 0 }
@return $target / $context + 0em;
}
$base-font-size: 15px;
h1 {
font-size: em(21px, 15px); // Outputs 1.4em
}