Skip to content

Commit 3ab35d1

Browse files
committed
Boostrap 5 upgrade: restored default colors due to Firefox not supporting relative CSS colors.
1 parent 846cb21 commit 3ab35d1

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

Diff for: src/Report/Html/Colors.php

+1-7
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,7 @@ final class Colors
2222

2323
public static function default(): self
2424
{
25-
return new self(
26-
'rgb(from var(--bs-success) r g b / 0.1)',
27-
'rgb(from var(--bs-success) r g b / 0.33)',
28-
'rgb(from var(--bs-success) r g b / 0.67)',
29-
'rgb(from var(--bs-warning) r g b / 0.1)',
30-
'rgb(from var(--bs-danger) r g b / 0.1)',
31-
);
25+
return new self('#dff0d8', '#c3e3b5', '#99cb84', '#fcf8e3', '#f2dede');
3226
}
3327

3428
public static function from(string $successLow, string $successMedium, string $successHigh, string $warning, string $danger): self

Diff for: tests/tests/Report/Html/ColorsTest.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ public function testCanBeCreatedFromDefaults(): void
2121
{
2222
$colors = Colors::default();
2323

24-
$this->assertSame('rgb(from var(--bs-success) r g b / 0.1)', $colors->successLow());
25-
$this->assertSame('rgb(from var(--bs-success) r g b / 0.33)', $colors->successMedium());
26-
$this->assertSame('rgb(from var(--bs-success) r g b / 0.67)', $colors->successHigh());
27-
$this->assertSame('rgb(from var(--bs-warning) r g b / 0.1)', $colors->warning());
28-
$this->assertSame('rgb(from var(--bs-danger) r g b / 0.1)', $colors->danger());
24+
$this->assertSame('#dff0d8', $colors->successLow());
25+
$this->assertSame('#c3e3b5', $colors->successMedium());
26+
$this->assertSame('#99cb84', $colors->successHigh());
27+
$this->assertSame('#fcf8e3', $colors->warning());
28+
$this->assertSame('#f2dede', $colors->danger());
2929
}
3030

3131
public function testCanBeCreatedFromCustomValues(): void

0 commit comments

Comments
 (0)