Skip to content

Commit 1654ebe

Browse files
sestinjclaude
andcommitted
fix: eliminate dark strip in OG card by pre-cropping background
Chrome headless wasn't reliably rendering object-fit:cover. Pre-crop og-bg.png to exactly 1280x640 (og-bg-card.png) so no object-fit is needed. Background now fills edge to edge. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 846e0e5 commit 1654ebe

3 files changed

Lines changed: 16 additions & 7 deletions

File tree

.github/assets/og-bg-card.png

1.54 MB
Loading

.github/assets/og-card.html

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,36 @@
99
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400&family=IBM+Plex+Sans:wght@300;400;500&display=swap" rel="stylesheet">
1010
<style>
1111
* { margin: 0; padding: 0; box-sizing: border-box; }
12+
html {
13+
background: #1a1a2e;
14+
}
1215
body {
1316
width: 1280px;
1417
height: 640px;
1518
overflow: hidden;
1619
font-family: 'IBM Plex Sans', -apple-system, sans-serif;
17-
background: #1a1a2e;
1820
position: relative;
1921
}
2022

2123
/* Watercolor background */
2224
.bg-image {
2325
position: absolute;
24-
inset: 0;
25-
background: url('./og-bg.png') center/cover no-repeat;
26+
top: 0; left: 0;
27+
width: 1280px;
28+
height: 640px;
29+
}
30+
.bg-image img {
31+
width: 1280px;
32+
height: 640px;
33+
display: block;
2634
}
2735

2836
/* Gradient overlay — darker on left for text, transparent on right for icon */
2937
.bg-wash {
3038
position: absolute;
31-
inset: 0;
39+
top: 0; left: 0;
40+
width: 1280px;
41+
height: 640px;
3242
background: linear-gradient(
3343
to right,
3444
rgba(10, 10, 30, 0.7) 0%,
@@ -42,7 +52,7 @@
4252
position: relative;
4353
z-index: 1;
4454
width: 660px;
45-
height: 100%;
55+
height: 640px;
4656
display: flex;
4757
flex-direction: column;
4858
justify-content: center;
@@ -97,12 +107,11 @@
97107
transform: translateY(-50%);
98108
width: 520px;
99109
height: 520px;
100-
opacity: 1;
101110
}
102111
</style>
103112
</head>
104113
<body>
105-
<div class="bg-image"></div>
114+
<div class="bg-image"><img src="./og-bg-card.png" alt=""></div>
106115
<div class="bg-wash"></div>
107116
<div class="content">
108117
<p class="label">Continue</p>

.github/assets/og-card.jpg

-20 KB
Loading

0 commit comments

Comments
 (0)