From 29d1591991a281898099ab7bc6e6864ee40b0c0a Mon Sep 17 00:00:00 2001 From: inwerpsel Date: Fri, 12 Feb 2021 16:25:46 +0100 Subject: [PATCH] PLANET-5850 Remove CSS vars ponyfill --- assets/src/js/app.js | 2 -- assets/src/js/cssvarsponyfill.js | 4 ---- src/MasterSite.php | 3 +-- 3 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 assets/src/js/cssvarsponyfill.js diff --git a/assets/src/js/app.js b/assets/src/js/app.js index 06c3d9447e..aecec5c024 100644 --- a/assets/src/js/app.js +++ b/assets/src/js/app.js @@ -6,7 +6,6 @@ import { setupLoadMore } from './load_more'; import { setupPDFIcon } from './pdf_icon'; import { setupSearch } from './search'; import { setupExternalLinks } from './external_links'; -import { setupCSSVarsPonyfill } from './cssvarsponyfill'; import { setupEnhancedDonateButton } from './enhancedDonateButton'; import 'bootstrap'; @@ -28,6 +27,5 @@ jQuery(function($) { setupPDFIcon($); setupSearch($); setupExternalLinks($); - setupCSSVarsPonyfill(); setupEnhancedDonateButton(); }); diff --git a/assets/src/js/cssvarsponyfill.js b/assets/src/js/cssvarsponyfill.js deleted file mode 100644 index 53aa2917d7..0000000000 --- a/assets/src/js/cssvarsponyfill.js +++ /dev/null @@ -1,4 +0,0 @@ -/* global cssVars */ -export const setupCSSVarsPonyfill = () => { - cssVars(); -}; diff --git a/src/MasterSite.php b/src/MasterSite.php index b5a00e5ece..ae37e525b5 100644 --- a/src/MasterSite.php +++ b/src/MasterSite.php @@ -712,7 +712,6 @@ public function enqueue_public_assets() { // JS files. wp_register_script( 'jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js', [], '3.3.1', true ); - wp_register_script( 'cssvarsponyfill', 'https://cdnjs.cloudflare.com/ajax/libs/css-vars-ponyfill/2.3.1/css-vars-ponyfill.min.js', [], '2', false ); // Variables reflected from PHP to the JS side. $localized_variables = [ @@ -722,7 +721,7 @@ public function enqueue_public_assets() { 'show_scroll_times' => Search::SHOW_SCROLL_TIMES, ]; - wp_register_script( 'main', $this->theme_dir . '/assets/build/index.js', [ 'jquery', 'cssvarsponyfill' ], $js_creation, true ); + wp_register_script( 'main', $this->theme_dir . '/assets/build/index.js', [ 'jquery' ], $js_creation, true ); wp_localize_script( 'main', 'localizations', $localized_variables ); wp_enqueue_script( 'main' ); }