From 24645c6b6ddc80fa96ebedd37330571841335421 Mon Sep 17 00:00:00 2001 From: Jeremy Postlethwaite Date: Sun, 12 May 2024 15:45:39 -0700 Subject: [PATCH] Boostrap 5 upgrade: restored default colors due to Firefox not supporting relative CSS colors. --- src/Report/Html/Colors.php | 8 +------- tests/tests/Report/Html/ColorsTest.php | 10 +++++----- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/Report/Html/Colors.php b/src/Report/Html/Colors.php index bbdabbd4b..c57aaf8fb 100644 --- a/src/Report/Html/Colors.php +++ b/src/Report/Html/Colors.php @@ -22,13 +22,7 @@ final class Colors public static function default(): self { - return new self( - 'rgb(from var(--bs-success) r g b / 0.1)', - 'rgb(from var(--bs-success) r g b / 0.33)', - 'rgb(from var(--bs-success) r g b / 0.67)', - 'rgb(from var(--bs-warning) r g b / 0.1)', - 'rgb(from var(--bs-danger) r g b / 0.1)', - ); + return new self('#dff0d8', '#c3e3b5', '#99cb84', '#fcf8e3', '#f2dede'); } public static function from(string $successLow, string $successMedium, string $successHigh, string $warning, string $danger): self diff --git a/tests/tests/Report/Html/ColorsTest.php b/tests/tests/Report/Html/ColorsTest.php index 50c688b6d..78f17b58f 100644 --- a/tests/tests/Report/Html/ColorsTest.php +++ b/tests/tests/Report/Html/ColorsTest.php @@ -21,11 +21,11 @@ public function testCanBeCreatedFromDefaults(): void { $colors = Colors::default(); - $this->assertSame('rgb(from var(--bs-success) r g b / 0.1)', $colors->successLow()); - $this->assertSame('rgb(from var(--bs-success) r g b / 0.33)', $colors->successMedium()); - $this->assertSame('rgb(from var(--bs-success) r g b / 0.67)', $colors->successHigh()); - $this->assertSame('rgb(from var(--bs-warning) r g b / 0.1)', $colors->warning()); - $this->assertSame('rgb(from var(--bs-danger) r g b / 0.1)', $colors->danger()); + $this->assertSame('#dff0d8', $colors->successLow()); + $this->assertSame('#c3e3b5', $colors->successMedium()); + $this->assertSame('#99cb84', $colors->successHigh()); + $this->assertSame('#fcf8e3', $colors->warning()); + $this->assertSame('#f2dede', $colors->danger()); } public function testCanBeCreatedFromCustomValues(): void