fix(ui): detect hsl()/hsla() as Outlook-incompatible CSS#3401
Open
sjhddh wants to merge 1 commit intoresend:canaryfrom
Open
fix(ui): detect hsl()/hsla() as Outlook-incompatible CSS#3401sjhddh wants to merge 1 commit intoresend:canaryfrom
sjhddh wants to merge 1 commit intoresend:canaryfrom
Conversation
The Outlook compatibility checker already warns on oklch and similar modern color functions, but misses hsl()/hsla(). Outlook strips these silently. Add them to the detection list. caniemail.com has no hsl() entry, and `pnpm caniemail:fetch` fully overwrites `caniemail-data.ts` — so this adds a hand-curated overlay at `custom-support-entries.ts`, spread into the checker loop at runtime. Closes resend#2947 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
|
@sjhddh is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
|
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2947. Adds
hsl()/hsla()to the Outlook compatibility checker.@gabrielmfern invited this in the issue thread — here's a stab.
Approach
The checker is data-driven off caniemail.com's dataset. caniemail has no
hsl()entry, andpnpm caniemail:fetchfully overwritespackages/ui/src/actions/email-validation/caniemail-data.ts. So editing that file directly would be wiped on the next fetch.Instead, this PR adds a hand-curated overlay at
packages/ui/src/actions/email-validation/custom-support-entries.ts— oneSupportEntryforhsl(), hsla()with Outlook Windows 2007–2019 marked"n"(→errorstatus via the existing stats pipeline). The overlay is spread into the checker loop at runtime:Happy to rename (
curated-,manual-,extra-) or restructure (e.g. merge at fetch time insidefill-caniemail-data.mts) if you'd prefer a different pattern — this is establishing a new precedent since nocustom-*-entries.tsexists today.Known limitation (pre-existing, not introduced here)
The function matcher at
check-compatibility.ts:293is case-sensitive:entryFunctions.includes(functionName). SoHSL(...)won't match. Same applies to the existingoklch/lch/labentries today. Can fix in a follow-up if you want.Tests
packages/ui/src/actions/email-validation/check-compatibility.spec.ts— 4 new cases:background-color: hsl(200, 50%, 50%)→ Outlook errorcolor: hsla(120, 100%, 50%, 0.5)→ Outlook errorhsl( 200 , 50% , 50% )→ Outlook errorLint clean. TypeScript clean. No lockfile changes.
Summary by cubic
Detects and warns on CSS hsl()/hsla() as Outlook-incompatible in the email compatibility checker. Uses a curated overlay so the warning persists when
caniemail-datais refreshed.css-hsl-hslasupport entry with Outlook Windows 2007–2019 as unsupported, merged at runtime with caniemail data.customSupportEntriesin addition tosupportEntries.Written for commit c3cfd70. Summary will update on new commits.