From 76812f5988bac7a613d38048824a3682d8c9d63f Mon Sep 17 00:00:00 2001 From: Mikel Kew Date: Thu, 25 Jun 2020 09:21:23 +1000 Subject: [PATCH] Example of using class to hide SVG symbols --- js-packages/@fortawesome/fontawesome-svg-core/index.es.js | 2 +- js-packages/@fortawesome/fontawesome-svg-core/index.js | 2 +- js-packages/@fortawesome/fontawesome-svg-core/styles.css | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js-packages/@fortawesome/fontawesome-svg-core/index.es.js b/js-packages/@fortawesome/fontawesome-svg-core/index.es.js index 0781e81d8..2e7efa505 100644 --- a/js-packages/@fortawesome/fontawesome-svg-core/index.es.js +++ b/js-packages/@fortawesome/fontawesome-svg-core/index.es.js @@ -900,7 +900,7 @@ function asSymbol (_ref) { return [{ tag: 'svg', attributes: { - style: 'display: none;' + class: 'svg-symbol--fa' }, children: [{ tag: 'symbol', diff --git a/js-packages/@fortawesome/fontawesome-svg-core/index.js b/js-packages/@fortawesome/fontawesome-svg-core/index.js index 811ef10c2..6cfc324ac 100644 --- a/js-packages/@fortawesome/fontawesome-svg-core/index.js +++ b/js-packages/@fortawesome/fontawesome-svg-core/index.js @@ -906,7 +906,7 @@ return [{ tag: 'svg', attributes: { - style: 'display: none;' + class: 'svg-symbol--fa' }, children: [{ tag: 'symbol', diff --git a/js-packages/@fortawesome/fontawesome-svg-core/styles.css b/js-packages/@fortawesome/fontawesome-svg-core/styles.css index b99120774..036b17424 100644 --- a/js-packages/@fortawesome/fontawesome-svg-core/styles.css +++ b/js-packages/@fortawesome/fontawesome-svg-core/styles.css @@ -320,6 +320,9 @@ svg:not(:root).svg-inline--fa { height: 2em; width: 2.5em; } +.svg-symbol--fa { + display: none; } + .fa-inverse { color: #fff; }