✨ feature: Add mixin to generate typography css classes
This commit is contained in:
parent
259fb3b91f
commit
6274d4d814
|
@ -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: “”
|
// If the variable has no prefix, don't assign anything to the $prefix attribute, leave its default value: “”
|
||||||
@mixin generate-css-variables($map, $prefix: "") {
|
@mixin generate-css-variables($map, $prefix: "") {
|
||||||
@if $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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user