SCSS: Add font weight variables / helpers

This commit is contained in:
Molkobain
2021-06-03 18:40:44 +02:00
committed by Eric
parent 0d35f20bf4
commit ddad4717ff
2 changed files with 161 additions and 78 deletions

View File

@@ -16,23 +16,52 @@
* You should have received a copy of the GNU Affero General Public License
*/
/* Fonts
Value Common weight name (https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
100 Thin (Hairline)
200 Extra Light (Ultra Light)
300 Light
400 Normal (Regular)
500 Medium
600 Semi Bold (Demi Bold)
700 Bold
800 Extra Bold (Ultra Bold)
900 Black (Heavy)
950 Extra Black (Ultra Black)
/*
* SCSS helpers for font weights (use in SCSS files)
*
* Use them to only redefine the font weight instead of the global font defnition, this way if the container's font changes
* the other properties will be propagated (size, style)
*/
%ibo-font-weight-100 {
font-weight: $ibo-font-weight-100;
}
%ibo-font-weight-200 {
font-weight: $ibo-font-weight-200;
}
%ibo-font-weight-300 {
font-weight: $ibo-font-weight-300;
}
%ibo-font-weight-400 {
font-weight: $ibo-font-weight-400;
}
%ibo-font-weight-500 {
font-weight: $ibo-font-weight-500;
}
%ibo-font-weight-600 {
font-weight: $ibo-font-weight-600;
}
%ibo-font-weight-700 {
font-weight: $ibo-font-weight-700;
}
%ibo-font-weight-800 {
font-weight: $ibo-font-weight-800;
}
%ibo-font-weight-900 {
font-weight: $ibo-font-weight-900;
}
%ibo-font-weight-950 {
font-weight: $ibo-font-weight-950;
}
/*
* SCSS helpers for global font definition (use in SCSS files)
*
* Use this only when you want to completely redefine the font, otherwise use the other helpers above
*/
%ibo-font-ral-nor-50 {
font-size: $ibo-font-size-50;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -40,7 +69,7 @@
%ibo-font-ral-nor-100 {
font-size: $ibo-font-size-100;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -48,7 +77,7 @@
%ibo-font-ral-nor-150 {
font-size: $ibo-font-size-150;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -56,7 +85,7 @@
%ibo-font-ral-nor-200 {
font-size: $ibo-font-size-200;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -64,7 +93,7 @@
%ibo-font-ral-nor-250 {
font-size: $ibo-font-size-250;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -72,7 +101,7 @@
%ibo-font-ral-nor-300 {
font-size: $ibo-font-size-300;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -80,7 +109,7 @@
%ibo-font-ral-nor-350 {
font-size: $ibo-font-size-350;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -88,7 +117,7 @@
%ibo-font-ral-nor-400 {
font-size: $ibo-font-size-400;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -96,7 +125,7 @@
%ibo-font-ral-nor-450 {
font-size: $ibo-font-size-450;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -104,7 +133,7 @@
%ibo-font-ral-nor-500 {
font-size: $ibo-font-size-500;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -112,7 +141,7 @@
%ibo-font-ral-nor-550 {
font-size: $ibo-font-size-550;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -120,7 +149,7 @@
%ibo-font-ral-med-50 {
font-size: $ibo-font-size-50;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 500;
font-weight: $ibo-font-weight-500;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -128,7 +157,7 @@
%ibo-font-ral-med-100 {
font-size: $ibo-font-size-100;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 500;
font-weight: $ibo-font-weight-500;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -136,7 +165,7 @@
%ibo-font-ral-med-150 {
font-size: $ibo-font-size-150;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 500;
font-weight: $ibo-font-weight-500;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -144,7 +173,7 @@
%ibo-font-ral-med-200 {
font-size: $ibo-font-size-200;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 500;
font-weight: $ibo-font-weight-500;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -152,7 +181,7 @@
%ibo-font-ral-med-250 {
font-size: $ibo-font-size-250;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 500;
font-weight: $ibo-font-weight-500;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -160,7 +189,7 @@
%ibo-font-ral-med-300 {
font-size: $ibo-font-size-300;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 500;
font-weight: $ibo-font-weight-500;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -168,7 +197,7 @@
%ibo-font-ral-med-350 {
font-size: $ibo-font-size-350;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 500;
font-weight: $ibo-font-weight-500;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -176,7 +205,7 @@
%ibo-font-ral-med-400 {
font-size: $ibo-font-size-400;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 500;
font-weight: $ibo-font-weight-500;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -184,7 +213,7 @@
%ibo-font-ral-med-450 {
font-size: $ibo-font-size-450;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 500;
font-weight: $ibo-font-weight-500;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -192,7 +221,7 @@
%ibo-font-ral-med-500 {
font-size: $ibo-font-size-500;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 500;
font-weight: $ibo-font-weight-500;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -200,7 +229,7 @@
%ibo-font-ral-med-550 {
font-size: $ibo-font-size-550;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 500;
font-weight: $ibo-font-weight-500;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -208,7 +237,7 @@
%ibo-font-ral-bol-50 {
font-size: $ibo-font-size-50;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 700;
font-weight: $ibo-font-weight-700;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -216,7 +245,7 @@
%ibo-font-ral-bol-100 {
font-size: $ibo-font-size-100;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 700;
font-weight: $ibo-font-weight-700;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -224,7 +253,7 @@
%ibo-font-ral-bol-150 {
font-size: $ibo-font-size-150;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 700;
font-weight: $ibo-font-weight-700;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -232,7 +261,7 @@
%ibo-font-ral-bol-200 {
font-size: $ibo-font-size-200;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 700;
font-weight: $ibo-font-weight-700;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -240,7 +269,7 @@
%ibo-font-ral-bol-250 {
font-size: $ibo-font-size-250;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 700;
font-weight: $ibo-font-weight-700;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -248,7 +277,7 @@
%ibo-font-ral-bol-300 {
font-size: $ibo-font-size-300;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 700;
font-weight: $ibo-font-weight-700;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -256,7 +285,7 @@
%ibo-font-ral-bol-350 {
font-size: $ibo-font-size-350;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 700;
font-weight: $ibo-font-weight-700;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -264,7 +293,7 @@
%ibo-font-ral-bol-400 {
font-size: $ibo-font-size-400;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 700;
font-weight: $ibo-font-weight-700;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -272,7 +301,7 @@
%ibo-font-ral-bol-450 {
font-size: $ibo-font-size-450;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 700;
font-weight: $ibo-font-weight-700;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -280,7 +309,7 @@
%ibo-font-ral-bol-500 {
font-size: $ibo-font-size-500;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 700;
font-weight: $ibo-font-weight-700;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -288,7 +317,7 @@
%ibo-font-ral-bol-550 {
font-size: $ibo-font-size-550;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 700;
font-weight: $ibo-font-weight-700;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -296,7 +325,7 @@
%ibo-font-ral-sembol-50 {
font-size: $ibo-font-size-50;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 600;
font-weight: $ibo-font-weight-600;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -304,7 +333,7 @@
%ibo-font-ral-sembol-100 {
font-size: $ibo-font-size-100;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 600;
font-weight: $ibo-font-weight-600;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -312,7 +341,7 @@
%ibo-font-ral-sembol-150 {
font-size: $ibo-font-size-150;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 600;
font-weight: $ibo-font-weight-600;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -320,7 +349,7 @@
%ibo-font-ral-sembol-200 {
font-size: $ibo-font-size-200;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 600;
font-weight: $ibo-font-weight-600;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -328,7 +357,7 @@
%ibo-font-ral-sembol-250 {
font-size: $ibo-font-size-250;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 600;
font-weight: $ibo-font-weight-600;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -336,7 +365,7 @@
%ibo-font-ral-sembol-300 {
font-size: $ibo-font-size-300;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 600;
font-weight: $ibo-font-weight-600;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -344,7 +373,7 @@
%ibo-font-ral-sembol-350 {
font-size: $ibo-font-size-350;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 600;
font-weight: $ibo-font-weight-600;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -352,7 +381,7 @@
%ibo-font-ral-sembol-400 {
font-size: $ibo-font-size-400;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 600;
font-weight: $ibo-font-weight-600;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -360,7 +389,7 @@
%ibo-font-ral-sembol-450 {
font-size: $ibo-font-size-450;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 600;
font-weight: $ibo-font-weight-600;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -368,7 +397,7 @@
%ibo-font-ral-sembol-500 {
font-size: $ibo-font-size-500;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 600;
font-weight: $ibo-font-weight-600;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -376,7 +405,7 @@
%ibo-font-ral-sembol-550 {
font-size: $ibo-font-size-550;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 600;
font-weight: $ibo-font-weight-600;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
font-feature-settings: "lnum";
@@ -384,7 +413,7 @@
%ibo-font-ral-ita-50 {
font-size: $ibo-font-size-50;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
font-style: italic;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
@@ -393,7 +422,7 @@
%ibo-font-ral-ita-100 {
font-size: $ibo-font-size-100;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
font-style: italic;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
@@ -402,7 +431,7 @@
%ibo-font-ral-ita-150 {
font-size: $ibo-font-size-150;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
font-style: italic;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
@@ -411,7 +440,7 @@
%ibo-font-ral-ita-200 {
font-size: $ibo-font-size-200;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
font-style: italic;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
@@ -420,7 +449,7 @@
%ibo-font-ral-ita-250 {
font-size: $ibo-font-size-250;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
font-style: italic;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
@@ -429,7 +458,7 @@
%ibo-font-ral-ita-300 {
font-size: $ibo-font-size-300;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
font-style: italic;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
@@ -438,7 +467,7 @@
%ibo-font-ral-ita-350 {
font-size: $ibo-font-size-350;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
font-style: italic;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
@@ -447,7 +476,7 @@
%ibo-font-ral-ita-400 {
font-size: $ibo-font-size-400;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
font-style: italic;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
@@ -456,7 +485,7 @@
%ibo-font-ral-ita-450 {
font-size: $ibo-font-size-450;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
font-style: italic;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
@@ -465,7 +494,7 @@
%ibo-font-ral-ita-500 {
font-size: $ibo-font-size-500;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
font-style: italic;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
@@ -475,7 +504,7 @@
%ibo-font-ral-ita-550 {
font-size: $ibo-font-size-550;
font-family: $ibo-font-family-base, $ibo-font-family-fallbacks;
font-weight: 400;
font-weight: $ibo-font-weight-400;
font-style: italic;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
@@ -485,69 +514,98 @@
%ibo-font-code-50 {
font-size: $ibo-font-size-50;
font-family: $ibo-font-family-code;
font-weight: 400;
font-weight: $ibo-font-weight-400;
}
%ibo-font-code-100 {
font-size: $ibo-font-size-100;
font-family: $ibo-font-family-code;
font-weight: 400;
font-weight: $ibo-font-weight-400;
}
%ibo-font-code-150 {
font-size: $ibo-font-size-150;
font-family: $ibo-font-family-code;
font-weight: 400;
font-weight: $ibo-font-weight-400;
}
%ibo-font-code-200 {
font-size: $ibo-font-size-200;
font-family: $ibo-font-family-code;
font-weight: 400;
font-weight: $ibo-font-weight-400;
}
%ibo-font-code-250 {
font-size: $ibo-font-size-250;
font-family: $ibo-font-family-code;
font-weight: 400;
font-weight: $ibo-font-weight-400;
}
%ibo-font-code-300 {
font-size: $ibo-font-size-300;
font-family: $ibo-font-family-code;
font-weight: 400;
font-weight: $ibo-font-weight-400;
}
%ibo-font-code-350 {
font-size: $ibo-font-size-350;
font-family: $ibo-font-family-code;
font-weight: 400;
font-weight: $ibo-font-weight-400;
}
%ibo-font-code-400 {
font-size: $ibo-font-size-400;
font-family: $ibo-font-family-code;
font-weight: 400;
font-weight: $ibo-font-weight-400;
}
%ibo-font-code-450 {
font-size: $ibo-font-size-450;
font-family: $ibo-font-family-code;
font-weight: 400;
font-weight: $ibo-font-weight-400;
}
%ibo-font-code-500 {
font-size: $ibo-font-size-500;
font-family: $ibo-font-family-code;
font-weight: 400;
font-weight: $ibo-font-weight-400;
}
%ibo-font-code-550 {
font-size: $ibo-font-size-550;
font-family: $ibo-font-family-code;
font-weight: 400;
font-weight: $ibo-font-weight-400;
}
/*
* CSS classes for font weights (use in HTML markup, JS scripts)
*
* Use them to only redefine the font weight instead of the global font defnition, this way if the container's font changes
* the other properties will be propagated (size, style)
*/
$ibo-font-weights: (
'ibo-font-weight-100',
'ibo-font-weight-200',
'ibo-font-weight-300',
'ibo-font-weight-400',
'ibo-font-weight-500',
'ibo-font-weight-600',
'ibo-font-weight-700',
'ibo-font-weight-800',
'ibo-font-weight-900',
'ibo-font-weight-950'
);
@each $sFontWeight in $ibo-font-weights {
.#{$sFontWeight} {
@extend %#{$sFontWeight};
}
}
/*
* CSS classes for global font wrappers (use in HTML markup, JS scripts)
*
* Use this only when you want to completely redefine the font, otherwise use the other helpers
*/
$ibo-fonts-all: (
'ibo-font-ral-nor-50',
'ibo-font-ral-nor-100',

View File

@@ -29,6 +29,18 @@ $ibo-font-size-450: 2.5rem !default; /* 30px */
$ibo-font-size-500: 3rem !default; /* 36px */
$ibo-font-size-550: 4rem !default; /* 48px */
/* Value Common weight name (https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) */
$ibo-font-weight-100: 100 !default; /* 100 Thin (Harline) */
$ibo-font-weight-200: 200 !default; /* 200 Extra Light (Ultra Light) */
$ibo-font-weight-300: 300 !default; /* 300 Light */
$ibo-font-weight-400: 400 !default; /* 400 Normal (Regular) */
$ibo-font-weight-500: 500 !default; /* 500 Medium */
$ibo-font-weight-600: 600 !default; /* 600 Semi Bold (Demi Bold) */
$ibo-font-weight-700: 700 !default; /* 700 Bold */
$ibo-font-weight-800: 800 !default; /* 800 Extra Bold (Ultra Bold) */
$ibo-font-weight-900: 900 !default; /* 900 Black (Heavy) */
$ibo-font-weight-950: 950 !default; /* 950 Extra Black (Ultra Black) */
$ibo-font-family-base: "Raleway" !default;
$ibo-font-family-fallbacks: "sans-serif", "system-ui" !default;
$ibo-font-family-monospace: "monospace" !default;
@@ -48,6 +60,19 @@ $ibo-font-family-code: $ibo-font-family-monospace !default;
--ibo-font-size-550: #{$ibo-font-size-550};
}
:root {
--ibo-font-weight-100: #{$ibo-font-weight-100};
--ibo-font-weight-200: #{$ibo-font-weight-200};
--ibo-font-weight-300: #{$ibo-font-weight-300};
--ibo-font-weight-400: #{$ibo-font-weight-400};
--ibo-font-weight-500: #{$ibo-font-weight-500};
--ibo-font-weight-600: #{$ibo-font-weight-600};
--ibo-font-weight-700: #{$ibo-font-weight-700};
--ibo-font-weight-800: #{$ibo-font-weight-800};
--ibo-font-weight-900: #{$ibo-font-weight-900};
--ibo-font-weight-950: #{$ibo-font-weight-950};
}
:root {
--ibo-font-family-base: #{$ibo-font-family-base};
--ibo-font-family-monospace: #{$ibo-font-family-monospace};