From 2e800254c97821c53a2057eaa989a4801feecd90 Mon Sep 17 00:00:00 2001 From: Sami Ahmed Siddiqui Date: Tue, 16 Aug 2022 13:43:57 +0500 Subject: [PATCH] variable for the FA font name --- assets/scss/_nav.scss | 4 ++-- assets/scss/_search.scss | 2 +- assets/scss/_taxonomy.scss | 8 ++++---- assets/scss/_variables.scss | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/assets/scss/_nav.scss b/assets/scss/_nav.scss index b603c8f903..650e4caad0 100644 --- a/assets/scss/_nav.scss +++ b/assets/scss/_nav.scss @@ -121,7 +121,7 @@ font-variant: normal; text-rendering: auto; -webkit-font-smoothing: antialiased; - font-family: "Font Awesome 6 Free"; + font-family: $font-awesome-font-name; font-weight: 900; content: "\f0d9"; padding-left: 0.5em; @@ -173,7 +173,7 @@ nav.foldable-nav { font-variant: normal; text-rendering: auto; -webkit-font-smoothing: antialiased; - font-family: "Font Awesome 6 Free"; font-weight: 900; content: "\f0da"; + font-family: $font-awesome-font-name; font-weight: 900; content: "\f0da"; position: absolute; left: 0.1em; padding-left: 0.4em; diff --git a/assets/scss/_search.scss b/assets/scss/_search.scss index 49de03da18..c5768bb84f 100644 --- a/assets/scss/_search.scss +++ b/assets/scss/_search.scss @@ -14,7 +14,7 @@ border-radius: 1rem; } - font-family: "Font Awesome 6 Free", $font-family-base; + font-family: $font-awesome-font-name, $font-family-base; } .popover.offline-search-result { diff --git a/assets/scss/_taxonomy.scss b/assets/scss/_taxonomy.scss index 32ce511e28..ca6a360c4d 100644 --- a/assets/scss/_taxonomy.scss +++ b/assets/scss/_taxonomy.scss @@ -207,7 +207,7 @@ font-variant: normal; text-rendering: auto; -webkit-font-smoothing: antialiased; - font-family: "Font Awesome 6 Free"; + font-family: $font-awesome-font-name; // font-weight: 900; padding-right: 0.5em; font-size: 2em; @@ -298,7 +298,7 @@ font-variant: normal; text-rendering: auto; -webkit-font-smoothing: antialiased; - font-family: "Font Awesome 6 Free"; + font-family: $font-awesome-font-name; content: "\f02d"; padding-right: 0.5em; } @@ -309,7 +309,7 @@ font-variant: normal; text-rendering: auto; -webkit-font-smoothing: antialiased; - font-family: "Font Awesome 6 Free"; + font-family: $font-awesome-font-name; content: "\f781"; padding-right: 0.5em; } @@ -325,7 +325,7 @@ font-variant: normal; text-rendering: auto; -webkit-font-smoothing: antialiased; - font-family: "Font Awesome 6 Free"; + font-family: $font-awesome-font-name; content: "\f122"; padding-right: 0.5em; } diff --git a/assets/scss/_variables.scss b/assets/scss/_variables.scss index ff47a3a3c8..f9e6a30edd 100644 --- a/assets/scss/_variables.scss +++ b/assets/scss/_variables.scss @@ -63,6 +63,7 @@ $link-hover-decoration: none !default; $google_font_name: "Open Sans" !default; $google_font_family: "Open+Sans:300,300i,400,400i,700,700i" !default; $web-font-path: "https://fonts.googleapis.com/css?family=#{$google_font_family}&display=swap"; +$font-awesome-font-name: "Font Awesome 6 Free" !default; $td-fonts-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";