From 8cdb554ea06182ea3ad6b05fe0f6d1202543ed65 Mon Sep 17 00:00:00 2001
From: Naser Mansour
-{{ config('app.url') }} +{{ config('app.url') }}
{{ Illuminate\Mail\Markdown::parse($slot) }} diff --git a/resources/views/vendor/mail/html/header.blade.php b/resources/views/vendor/mail/html/header.blade.php index 939e723..9e40f87 100644 --- a/resources/views/vendor/mail/html/header.blade.php +++ b/resources/views/vendor/mail/html/header.blade.php @@ -1,6 +1,6 @@ @props(['url'])
diff --git a/resources/views/vendor/mail/html/themes/default.css b/resources/views/vendor/mail/html/themes/default.css
index 7d11fc6..b720ef0 100644
--- a/resources/views/vendor/mail/html/themes/default.css
+++ b/resources/views/vendor/mail/html/themes/default.css
@@ -28,7 +28,7 @@ blockquote {
}
a {
- color: #0A1F44;
+ color: #4A4A42;
}
a img {
@@ -38,7 +38,7 @@ a img {
/* Typography */
h1 {
- color: #0A1F44;
+ color: #4A4A42;
font-size: 18px;
font-weight: bold;
margin-top: 0;
@@ -46,7 +46,7 @@ h1 {
}
h2 {
- color: #0A1F44;
+ color: #4A4A42;
font-size: 16px;
font-weight: bold;
margin-top: 0;
@@ -54,7 +54,7 @@ h2 {
}
h3 {
- color: #0A1F44;
+ color: #4A4A42;
font-size: 14px;
font-weight: bold;
margin-top: 0;
@@ -100,7 +100,7 @@ img {
/* Header */
.header {
- background-color: #0A1F44;
+ background-color: #4A4A42;
padding: 25px 0;
text-align: center;
}
@@ -184,7 +184,7 @@ img {
}
.footer a {
- color: #D4AF37;
+ color: #C9C4BA;
text-decoration: underline;
}
@@ -200,7 +200,7 @@ img {
.table th {
border-bottom: 1px solid #e4e4e7;
- color: #0A1F44;
+ color: #4A4A42;
margin: 0;
padding-bottom: 8px;
}
@@ -242,12 +242,12 @@ img {
.button-blue,
.button-primary {
- background-color: #D4AF37;
- border-bottom: 8px solid #D4AF37;
- border-left: 18px solid #D4AF37;
- border-right: 18px solid #D4AF37;
- border-top: 8px solid #D4AF37;
- color: #0A1F44;
+ background-color: #4A4A42;
+ border-bottom: 8px solid #4A4A42;
+ border-left: 18px solid #4A4A42;
+ border-right: 18px solid #4A4A42;
+ border-top: 8px solid #4A4A42;
+ color: #E8E4DC;
}
.button-green,
@@ -271,7 +271,7 @@ img {
/* Panels */
.panel {
- border-left: #D4AF37 solid 4px;
+ border-left: #C9C4BA solid 4px;
margin: 21px 0;
}
diff --git a/tests/Feature/Mail/EmailTemplateColorsTest.php b/tests/Feature/Mail/EmailTemplateColorsTest.php
new file mode 100644
index 0000000..d2c611a
--- /dev/null
+++ b/tests/Feature/Mail/EmailTemplateColorsTest.php
@@ -0,0 +1,105 @@
+toContain('a {')
+ ->and($css)->toContain('color: #4A4A42;');
+});
+
+test('default.css uses new charcoal color for h1 headings', function () {
+ $css = File::get(resource_path('views/vendor/mail/html/themes/default.css'));
+
+ expect($css)->toMatch('/h1\s*\{[^}]*color:\s*#4A4A42;/');
+});
+
+test('default.css uses new charcoal color for h2 headings', function () {
+ $css = File::get(resource_path('views/vendor/mail/html/themes/default.css'));
+
+ expect($css)->toMatch('/h2\s*\{[^}]*color:\s*#4A4A42;/');
+});
+
+test('default.css uses new charcoal color for h3 headings', function () {
+ $css = File::get(resource_path('views/vendor/mail/html/themes/default.css'));
+
+ expect($css)->toMatch('/h3\s*\{[^}]*color:\s*#4A4A42;/');
+});
+
+test('default.css uses new charcoal color for header background', function () {
+ $css = File::get(resource_path('views/vendor/mail/html/themes/default.css'));
+
+ expect($css)->toMatch('/\.header\s*\{[^}]*background-color:\s*#4A4A42;/');
+});
+
+test('default.css uses new warm gray color for footer links', function () {
+ $css = File::get(resource_path('views/vendor/mail/html/themes/default.css'));
+
+ expect($css)->toMatch('/\.footer a\s*\{[^}]*color:\s*#C9C4BA;/');
+});
+
+test('default.css uses new charcoal color for table headers', function () {
+ $css = File::get(resource_path('views/vendor/mail/html/themes/default.css'));
+
+ expect($css)->toMatch('/\.table th\s*\{[^}]*color:\s*#4A4A42;/');
+});
+
+test('default.css uses new charcoal background for primary buttons', function () {
+ $css = File::get(resource_path('views/vendor/mail/html/themes/default.css'));
+
+ expect($css)->toMatch('/\.button-primary\s*\{[^}]*background-color:\s*#4A4A42;/');
+});
+
+test('default.css uses new off-white text for primary buttons', function () {
+ $css = File::get(resource_path('views/vendor/mail/html/themes/default.css'));
+
+ expect($css)->toMatch('/\.button-primary\s*\{[^}]*color:\s*#E8E4DC;/');
+});
+
+test('default.css uses new warm gray color for panel border', function () {
+ $css = File::get(resource_path('views/vendor/mail/html/themes/default.css'));
+
+ expect($css)->toMatch('/\.panel\s*\{[^}]*border-left:\s*#C9C4BA/');
+});
+
+test('header.blade.php uses new charcoal background color', function () {
+ $header = File::get(resource_path('views/vendor/mail/html/header.blade.php'));
+
+ expect($header)->toContain('background-color: #4A4A42;');
+});
+
+test('header.blade.php does not use old navy color', function () {
+ $header = File::get(resource_path('views/vendor/mail/html/header.blade.php'));
+
+ expect($header)->not->toContain('#0A1F44');
+});
+
+test('footer.blade.php uses new warm gray color for links', function () {
+ $footer = File::get(resource_path('views/vendor/mail/html/footer.blade.php'));
+
+ expect($footer)->toContain('color: #C9C4BA;');
+});
+
+test('footer.blade.php does not use old gold color', function () {
+ $footer = File::get(resource_path('views/vendor/mail/html/footer.blade.php'));
+
+ expect($footer)->not->toContain('#D4AF37');
+});
+
+test('default.css does not use old navy color for headings and links', function () {
+ $css = File::get(resource_path('views/vendor/mail/html/themes/default.css'));
+
+ // Check that old navy color is not used in headings
+ expect($css)->not->toMatch('/h1\s*\{[^}]*color:\s*#0A1F44;/')
+ ->and($css)->not->toMatch('/h2\s*\{[^}]*color:\s*#0A1F44;/')
+ ->and($css)->not->toMatch('/h3\s*\{[^}]*color:\s*#0A1F44;/');
+});
+
+test('default.css does not use old gold color for buttons and panels', function () {
+ $css = File::get(resource_path('views/vendor/mail/html/themes/default.css'));
+
+ // Check that old gold color is not used in buttons
+ expect($css)->not->toMatch('/\.button-primary\s*\{[^}]*background-color:\s*#D4AF37;/')
+ ->and($css)->not->toMatch('/\.panel\s*\{[^}]*border-left:\s*#D4AF37/');
+});