From df54afe76230602706bca4732c4d2906861de9f9 Mon Sep 17 00:00:00 2001 From: acalvino4 <43254861+acalvino4@users.noreply.github.com> Date: Sat, 20 Jul 2024 13:23:08 -0600 Subject: [PATCH] fix inappropriate style injection --- CHANGELOG.md | 5 +++++ src/Plugin.php | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ca42c8..037f666 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Easy Image +## [2.0.1] - 2024-07-20 + +- Fixed regression that unscroupulously injected opinionated styles into templates + ## [2.0.0] - 2024-07-13 - Updated dependencies for Craft 5 @@ -21,6 +25,7 @@ - Added placeholder support - Added tests +[2.0.1]: (https://github.com/acalvino4/craft-easy-image/releases/tag/2.0.1) [2.0.0]: (https://github.com/acalvino4/craft-easy-image/releases/tag/2.0.0) [1.0.1]: (https://github.com/acalvino4/craft-easy-image/releases/tag/1.0.1) [1.0.0]: (https://github.com/acalvino4/craft-easy-image/releases/tag/1.0.0) diff --git a/src/Plugin.php b/src/Plugin.php index b353fad..596cfc8 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -9,7 +9,6 @@ use craft\base\Model; use craft\base\Plugin as BasePlugin; use craft\events\RegisterTemplateRootsEvent; -use craft\events\TemplateEvent; use craft\web\View; use yii\base\Event; @@ -69,9 +68,5 @@ private function attachEventHandlers(): void Event::on(View::class, View::EVENT_REGISTER_SITE_TEMPLATE_ROOTS, function(RegisterTemplateRootsEvent $e) { $e->roots['easy-image'] = __DIR__ . '/templates'; }); - - Event::on(View::class, View::EVENT_BEFORE_RENDER_TEMPLATE, function(TemplateEvent $event) { - Craft::$app->getView()->registerCss("img, video {object-fit: cover;}"); - }); } }