Skip to content

Square off the ad container so the corners stop showing white - #210

Merged
ralyodio merged 1 commit into
masterfrom
worktree-ads-square-corners
Aug 19, 2026
Merged

ralyodio merged 1 commit into
masterfrom
worktree-ads-square-corners

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

The embed iframe is square, but .cp-ad rounded its own corners at 8px, so the host page background bled through all four corners of every unit.

Sets border-radius:0 on all five .cp-ad container rules:

  • lib/ads/house.ts — house text link + house banner
  • lib/ads/creative.ts — paid text link + paid banner/rect
  • lib/ads/terminal.ts — terminal ad

Inner chrome (CTA pill, logo, brand badge) keeps its own radius.

Checks: tsc --noEmit clean apart from one pre-existing fast-xml-parser module-resolution error unrelated to this change; tests/contract/ads-terminal.test.ts + tests/ads-stats-box.test.ts pass (37 tests).

🤖 Generated with Claude Code

The iframe the embed drops in is square, but .cp-ad rounded its own
corners at 8px, so the host page background bled through the four
corners of every unit. Set the radius to 0 on all five container rules
(house banner and text link, paid creative banner and text link, and
the terminal ad). Inner chrome -- CTA pill, logo, brand badge -- keeps
its own radius.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

35 finding(s)

HIGH/CRITICAL: 3 | MEDIUM: 23 | LOW: 9

Severity Rule Location
HIGH tls-verification-disabled lib/onion.ts:47
HIGH secret-generic-credential lib/sp/platforms/facebook.ts:32
HIGH sh-remote-script-execution prober/deploy/provision.sh:30
MEDIUM js-unescaped-html-sink app/(app)/dashboard/admin/email-broadcast/EmailBroadcastForm.tsx:125
MEDIUM js-unescaped-html-sink app/(app)/dashboard/projects/[id]/autoblog/articles/[articleId]/page.tsx:214
MEDIUM js-unescaped-html-sink app/(marketing)/blog/[slug]/page.tsx:67
MEDIUM js-unescaped-html-sink app/(marketing)/blog/[slug]/page.tsx:97
MEDIUM js-unescaped-html-sink app/(marketing)/blog/[slug]/page.tsx:104
MEDIUM js-unescaped-html-sink app/(marketing)/blog/[slug]/page.tsx:110
MEDIUM js-unescaped-html-sink app/(marketing)/recent/page.tsx:186
MEDIUM js-unescaped-html-sink app/(marketing)/recent/page.tsx:190
MEDIUM js-unescaped-html-sink app/c/[project]/[slug]/page.tsx:77
MEDIUM js-unescaped-html-sink app/c/[project]/page.tsx:57
MEDIUM js-unescaped-html-sink app/careers.js/route.ts:228
MEDIUM js-unescaped-html-sink app/careers.js/route.ts:285
MEDIUM js-unescaped-html-sink app/layout.tsx:129
MEDIUM js-open-redirect app/login/form.tsx:39
MEDIUM js-unescaped-html-sink app/r/[token]/page.tsx:176
MEDIUM js-open-redirect app/signup/form.tsx:43
MEDIUM js-open-redirect components/billing/buy-credits-modal.tsx:98
MEDIUM js-unescaped-html-sink components/json-ld.tsx:8
MEDIUM js-unescaped-html-sink components/report/markdown-view.tsx:15
MEDIUM redos-nested-quantifier lib/careers/jobs.ts:139
MEDIUM js-unescaped-html-sink lib/careers/page-templates.ts:198
MEDIUM redos-nested-quantifier lib/emailMarkdown.ts:130
MEDIUM redos-nested-quantifier lib/lx/articleGen.ts:98
LOW secret-generic-credential app/(marketing)/docs/autoblog-webhook/page.tsx:145
LOW secret-generic-credential lib/sp/platforms/linkedin.ts:25
LOW js-dynamic-code-execution tests/careers-page-templates.test.ts:21
LOW js-dynamic-code-execution tests/careers-widget-script.test.ts:19
LOW js-dynamic-code-execution tests/careers-widget-script.test.ts:69
LOW js-dynamic-code-execution tests/contract/ad-visitor-id.test.ts:51
LOW js-dynamic-code-execution tests/contract/ad-visitor-id.test.ts:52
LOW secret-generic-credential tests/contract/posthog-integration.test.ts:13
LOW secret-generic-credential tests/lead-campaign.test.ts:16

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit f40c68c into master Aug 19, 2026
8 checks passed
@ralyodio
ralyodio deleted the worktree-ads-square-corners branch August 19, 2026 06:09
ralyodio added a commit that referenced this pull request Aug 19, 2026
#210 set border-radius to 0 on the five ad container rules, in exactly
the lines this branch rewrote for light/dark. Resolved by keeping both:
the containers stay square, and the palette and hairline stay
theme-aware.

Also squared off the three container radii in the React <AdPreview>,
which #210 missed. That component exists to mirror renderCreativeHtml,
so a rounded preview of a square unit is the drift it is there to
prevent. Inner chrome (logo, monogram, CTA pill) keeps its radius, and
so does the feed card, which mocks a reader's own sheet rather than an
ad container in an iframe.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant