From 79964588186128cbb08790eda2f32c28ff00392c Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Mon, 27 Jan 2025 00:46:50 +0100 Subject: [PATCH] [BUGFIX] Create `Size` with correct types in `expandBackgroundShorthand` This is the v8.x backport of #814. --- CHANGELOG.md | 1 + src/RuleSet/DeclarationBlock.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 969e437d..538b5f03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Fixed +- Create `Size` with correct types in `expandBackgroundShorthand` (#814) - Parse `@font-face` `src` property as comma-delimited list (#794) ## 8.7.0: Add support for PHP 8.4 diff --git a/src/RuleSet/DeclarationBlock.php b/src/RuleSet/DeclarationBlock.php index 8a1da14e..be22760b 100644 --- a/src/RuleSet/DeclarationBlock.php +++ b/src/RuleSet/DeclarationBlock.php @@ -432,8 +432,8 @@ public function expandBackgroundShorthand() 'background-repeat' => ['repeat'], 'background-attachment' => ['scroll'], 'background-position' => [ - new Size(0, '%', null, false, $this->iLineNo), - new Size(0, '%', null, false, $this->iLineNo), + new Size(0, '%', false, $this->iLineNo), + new Size(0, '%', false, $this->iLineNo), ], ]; $mRuleValue = $oRule->getValue();