From b85bd22e09c5ee3c75824382e11cd3ad5c4b76fd Mon Sep 17 00:00:00 2001 From: Sebastian Zoglowek <55794780+zoglo@users.noreply.github.com> Date: Thu, 28 Mar 2024 10:40:01 +0100 Subject: [PATCH] Drop empty unit restriction --- src/Compiler/FileCompiler.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Compiler/FileCompiler.php b/src/Compiler/FileCompiler.php index 5ca3db7..d6879f7 100644 --- a/src/Compiler/FileCompiler.php +++ b/src/Compiler/FileCompiler.php @@ -579,24 +579,14 @@ protected function isValidValue($varValue): array } // top,right,bottom,left / unit - if (array_key_exists('top', $varValue) && (!$varValue['unit'] || $varValue['top']=='')) + if (array_key_exists('top', $varValue) && $varValue['top']=='') { - if (strpos($varValue['top'], '$') === 0) - { - return [false, $varValue['top']]; - } - return [false, '']; } // value / unit - if (array_key_exists('unit', $varValue) && !array_key_exists('top', $varValue) && (!$varValue['unit'] || $varValue['value']=='')) + if (array_key_exists('unit', $varValue) && !array_key_exists('top', $varValue) && $varValue['value']=='') { - if (strpos($varValue['value'], '$') === 0) - { - return [false, $varValue['value']]; - } - return [false, '']; }