Skip to content

Instantly share code, notes, and snippets.

View babsgosgens's full-sized avatar
🤡
Life’s a parade

Babs Gösgens babsgosgens

🤡
Life’s a parade
  • Rosmalen, Netherlands
View GitHub Profile
@function extract-type-variant($type)
{
@return nth($type, 2);
}
@function extract-type-style($type)
{
@return nth($type, 1);
}
@function px-to-relative-line-height($target-px, $context: $base-font-size, $unit: $leading-unit)
{
@return px-to-relative-size($target-px, $context, $unit);
}
@function px-to-relative-font-size($target-px, $context: $base-font-size, $unit: $font-unit) {
@return px-to-relative-size($target-px, $context, $unit);
}
@mixin line-height($target,$context:$base-line-height)
{
// line-height: px-to-relative-line-height($target, $context);
@include adjust-leading-to($target, $context);
}
@mixin font-size($target,$context:$base-font-size)
{
// font-size: px-to-relative-font-size($target, $context);
@include adjust-font-size-to($target, $context);
}
@mixin font-family($type)
{
font-family: extract-type-family($type);
}
@mixin font-weight($type)
{
font-weight: extract-type-weight($type);
}
@mixin font-variant($type)
{
font-variant: extract-type-variant($type);
}
@mixin font-style($type)
{
font-style: extract-type-style($type);
}