From fbb3f92c5f4574704398003abdc8287185372c5b Mon Sep 17 00:00:00 2001 From: Aidan Saunders Date: Wed, 12 May 2021 22:01:06 +0100 Subject: [PATCH] Angular modules get added with weights 200+ so bump theme to 290 This means custom CSS also needs to be bumped above 290. Until https://github.com/civicrm/civicrm-core/pull/20278 is merged, there is no easy way to identify which snippet is the custom CSS one so we search for 'custom.css' in the name. --- finsburypark.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/finsburypark.php b/finsburypark.php index f7b750a..6aa2e57 100644 --- a/finsburypark.php +++ b/finsburypark.php @@ -37,7 +37,11 @@ function finsburypark_civicrm_alterBundle(CRM_Core_Resources_Bundle $bundle) { if ($bundle->name == 'coreStyles') { $bundle->filter(function($snippet) { if ($snippet['name'] == 'civicrm:css/civicrm.css') { - $snippet['weight'] = 90; + $snippet['weight'] = 290; + return $snippet; + } + elseif (($snippet['name'] == 'civicrm::css/custom.css') or (strpos($snippet['name'], 'custom.css') !== false)) { + $snippet['weight'] = 300; return $snippet; } return TRUE;