Fix newsletter issue pages rendering left-aligned on white; v2.3.1
Publish Container / build (push) Successful in 17m23s
Publish Container / build (push) Successful in 17m23s
The Resend email HTML uses align="left" on its outer wrapper table and a white background, both fine inside a narrow inbox pane but broken in a full-width browser tab: the content stuck to the left edge with a large white field to its right. Override with CSS that centers the content and matches the site's dark background. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fe4c09f8a3
commit
abfbb1981b
2 files changed
+10
-1
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "siteforge",
|
"name": "siteforge",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.3.0",
|
"version": "2.3.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -76,6 +76,15 @@ function buildIssuePageHtml(issue) {
|
|||||||
<meta name="twitter:description" content="${description}"/>
|
<meta name="twitter:description" content="${description}"/>
|
||||||
<meta name="twitter:image" content="${escapeHtml(ogImage)}"/>
|
<meta name="twitter:image" content="${escapeHtml(ogImage)}"/>
|
||||||
<link rel="canonical" href="${escapeHtml(canonical)}"/>
|
<link rel="canonical" href="${escapeHtml(canonical)}"/>
|
||||||
|
<style>
|
||||||
|
/* The source HTML is a Resend/React Email template built for a narrow email-client
|
||||||
|
viewport: its outer wrapper table uses align="left" (which browsers translate to
|
||||||
|
float: left) and relies on the surrounding white to be invisible in a ~600px inbox
|
||||||
|
pane. In a full-width browser tab that leaves a left-stuck column on a white field.
|
||||||
|
Force it to sit centered on the site's dark background instead. */
|
||||||
|
html, body { background-color: #0a0a08 !important; margin: 0; padding: 0; }
|
||||||
|
table[align="left"] { float: none !important; margin-left: auto !important; margin-right: auto !important; }
|
||||||
|
</style>
|
||||||
</head>`
|
</head>`
|
||||||
|
|
||||||
const ctaBlock = `
|
const ctaBlock = `
|
||||||
|
|||||||
Reference in new issue
Block a user