From 03e117b77e2bcd99ef15beba7de55a201dc2a548 Mon Sep 17 00:00:00 2001 From: GOMA Date: Wed, 16 Jul 2025 14:04:26 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20refactor:=20generate-ty?= =?UTF-8?q?po-class=20updated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/functions/_mixins.scss | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/functions/_mixins.scss b/src/functions/_mixins.scss index 31306de..c2f40c6 100644 --- a/src/functions/_mixins.scss +++ b/src/functions/_mixins.scss @@ -13,22 +13,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; +@mixin generate-typo-class($prefix, $name, $map) { + .#{$prefix}-#{$name} { + @each $key, $value in $map { + @if $key == "family" { + font-family: $value; + } @else if $key == "size" { + font-size: $value; + } @else if $key == "weight" { + font-weight: $value; + } @else if $key == "line-height" { + line-height: $value; + } @else if $key == "style" { + font-style: $value; + } @else if $key == "text-transform" { + text-transform: $value; + } @else if $key == "text-decoration" { + text-decoration: $value; + } } } } \ No newline at end of file