diff --git a/src/functions/_mixins.scss b/src/functions/_mixins.scss index 4ec02c3..31306de 100644 --- a/src/functions/_mixins.scss +++ b/src/functions/_mixins.scss @@ -1,4 +1,4 @@ -// Mixin that generates css variables +// Mixin to generate css variables // If the variable has no prefix, don't assign anything to the $prefix attribute, leave its default value: “” @mixin generate-css-variables($map, $prefix: "") { @if $prefix == "" { @@ -11,3 +11,24 @@ } } } + +// Mixin to generate typography css classes +@mixin generate-typo-class($map) { + @each $name, $value in $map { + @if $name == "family" { + font-family: $value; + } @else if $name == "size" { + font-size: $value; + } @else if $name == "weight" { + font-weight: $value; + } @else if $name == "line-height" { + line-height: $value; + } @else if $name == "style" { + font-style: $value; + } @else if $name == "text-transform" { + text-transform: $value; + } @else if $name == "text-decoration" { + text-decoration: $value; + } + } +} \ No newline at end of file