Skip to content

Commit

Permalink
Hotfix/hide svg sprite (#620)
Browse files Browse the repository at this point in the history
* Wraps the SVG sprite in a div so we can hide it easily

* Adds styles to hide the sprite div
  • Loading branch information
coreymcollins authored Mar 31, 2021
1 parent b105041 commit 6d98d54
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ function _s_include_svg_icons() {

// If it exists, include it.
if ( file_exists( $svg_icons ) ) {
echo '<div class="svg-sprite-wrapper">';
require_once $svg_icons;
echo '</div>';
}
}
add_action( 'wp_footer', '_s_include_svg_icons', 9999 );
Expand Down
6 changes: 6 additions & 0 deletions src/scss/base/_media.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//--------------------------------------------------------------
// Media & SVGs
//--------------------------------------------------------------
.svg-sprite-wrapper {
@apply hidden;
}
1 change: 1 addition & 0 deletions src/scss/base/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import "globals";
@import "alignment";
@import "headings";
@import "media";

0 comments on commit 6d98d54

Please sign in to comment.