ajout des utilitaires font-sizes

This commit is contained in:
Raphaël Goetter 2021-03-11 08:20:15 +01:00
parent 4993abacca
commit ca247b2a5d
5 changed files with 373 additions and 1 deletions

View file

@ -67,6 +67,21 @@ $font-family-monospace: consolas, courier, monospace;
$line-height-base: 1.5;
// Font sizes
$font-size: (
"10": 0.625rem,
"11": 0.6875rem,
"12": 0.75rem,
"14": 0.875rem,
"16": 1rem,
"18": 1.125rem,
"20": 1.25rem,
"24": 1.5rem,
"30": 1.875rem,
"36": 2.25rem,
"base": 1rem,
"inherit": "inherit",
);
$font-size-html: 62.5%;
$font-size-base: 1.6rem;

View file

@ -19,6 +19,7 @@
// UTILITY CLASSES
@import "utils/utils-global";
@import "utils/utils-font-sizes";
@import "utils/utils-spacers";
@import "utils/grillade";

View file

@ -0,0 +1,19 @@
/* Font sizes utility classes */
// loop for each font-size
@each $key, $value in $font-size {
.text-#{$key} {
font-size: $value;
}
}
// loop for each breakpoint
@each $key, $value in $font-size {
@each $bp, $bpv in $breakpoints {
@media (min-width: #{$bpv}) {
.#{$bp}\:text-#{$key} {
font-size: $value;
}
}
}
}