From 8bf0752845a9128dfba61fc24b2198d3b515f049 Mon Sep 17 00:00:00 2001 From: Chrissi Klassen Date: Thu, 16 May 2019 11:19:54 -0600 Subject: [PATCH] Remove 'px' from height/width attributes. 'px' is not needed to define pixel sizes in attributes, and removing 'px' allows users to define sizes in valid units other than pixels, for example percentages or ems. --- code/SVGTemplate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/SVGTemplate.php b/code/SVGTemplate.php index b3e4193..b04c367 100755 --- a/code/SVGTemplate.php +++ b/code/SVGTemplate.php @@ -195,11 +195,11 @@ private function process($filePath) } if ($this->width) { - $root->setAttribute('width', $this->width . 'px'); + $root->setAttribute('width', $this->width); } if ($this->height) { - $root->setAttribute('height', $this->height . 'px'); + $root->setAttribute('height', $this->height); } if ($this->extra_classes) {