fix: make localized landing hero resilient to long copy - #283
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4cd77c53e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Assert.Contains("white-space: normal;", css, StringComparison.Ordinal); | ||
| Assert.DoesNotContain( | ||
| ".hero h1 .gradient-text {\n display: block;\n white-space: nowrap;", | ||
| css, |
There was a problem hiding this comment.
Scope the wrapping assertion to the gradient rule
If .hero h1 .gradient-text is changed back to white-space: nowrap, this regression test still passes: the positive assertion finds white-space: normal in the Indonesian eyebrow rule, while the negative assertion cannot match the current gradient block because max-inline-size appears between display and white-space. Extract or otherwise inspect the gradient rule itself so the advertised clipping regression is actually detected.
Useful? React with 👍 / 👎.
Goal
Fix the production Indonesian landing-page hero clipping without weakening the English composition or changing content/release behavior.
Root cause
hero-p0.cssforced.gradient-texttowhite-space: nowrapinside a relatively narrow desktop text column. IndonesianDapat Anda percaya.is longer than the English line and can escape the column;.herothen clips the overflow.P0 fix
Regression guard
Adds a source regression test that fails if the gradient headline is forced back to
white-space: nowrapand verifies the Indonesian desktop safety rules remain present.Scope
2 files only:
landing/hero-p0.cssand one regression test.