♻️ refactor: generate-typo-class updated

This commit is contained in:
GOMA 2025-07-16 14:04:26 +02:00
parent 6274d4d814
commit 03e117b77e

View File

@ -13,22 +13,24 @@
} }
// Mixin to generate typography css classes // Mixin to generate typography css classes
@mixin generate-typo-class($map) { @mixin generate-typo-class($prefix, $name, $map) {
@each $name, $value in $map { .#{$prefix}-#{$name} {
@if $name == "family" { @each $key, $value in $map {
font-family: $value; @if $key == "family" {
} @else if $name == "size" { font-family: $value;
font-size: $value; } @else if $key == "size" {
} @else if $name == "weight" { font-size: $value;
font-weight: $value; } @else if $key == "weight" {
} @else if $name == "line-height" { font-weight: $value;
line-height: $value; } @else if $key == "line-height" {
} @else if $name == "style" { line-height: $value;
font-style: $value; } @else if $key == "style" {
} @else if $name == "text-transform" { font-style: $value;
text-transform: $value; } @else if $key == "text-transform" {
} @else if $name == "text-decoration" { text-transform: $value;
text-decoration: $value; } @else if $key == "text-decoration" {
text-decoration: $value;
}
} }
} }
} }