Skip to content

fix: replace Mintlify-unsupported Tailwind styles with custom CSS - #465

Merged
stefanjudis merged 3 commits into
mainfrom
fix/sign-up-cta-prod-styles
Jul 31, 2026
Merged

fix: replace Mintlify-unsupported Tailwind styles with custom CSS#465
stefanjudis merged 3 commits into
mainfrom
fix/sign-up-cta-prod-styles

Conversation

@stefanjudis

@stefanjudis stefanjudis commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Problem

The sign-up CTA (snippets/sign-up-cta.mdx, used on ~10 /learn/playwright pages) rendered as white text on a white background in production, while looking fine in mint dev.

Root cause: Mintlify's production build mixes Tailwind versions. It generates Tailwind v3-style utilities from our class names, but the page also registers Tailwind v4 typed CSS properties:

@property --tw-gradient-from { syntax: "<color>"; initial-value: #0000; }

The v3 gradient utility writes #0c449a var(--tw-gradient-from-position) into that variable — invalid as a <color> — so the browser falls back to transparent. Any gradient utility (from-* / via-* / to-*, standard or arbitrary) is broken in production. Separately, Mintlify's docs only support Tailwind v3 without arbitrary values, and recommend custom CSS files instead.

Fix

Move the CTA's styling into CSS we control (shipped verbatim to prod): all styling moved to style.css as .sign-up-cta classes (gradient, colors, stretched-link click area), and the snippet markup reduced to those class names.

cli-tip.jsx and setup-flow.jsx also use arbitrary values, but they render correctly in production today, so they stay untouched.

Remaining Tailwind utilities in these components are core v3 classes, which Mintlify supports.

Verification

Verified in mint dev via computed styles and screenshots: CTA gradient rgb(12,68,154) → rgb(6,32,71) with whole-card click overlay. Since the styling no longer depends on Mintlify's Tailwind pipeline, dev and prod can't diverge for this component.

Affected routes

All 46 /learn/playwright/* guide pages that embed the sign-up CTA:

Full list
  • /learn/playwright/assertions
  • /learn/playwright/authentication
  • /learn/playwright/bypass-totp
  • /learn/playwright/challenging-flows
  • /learn/playwright/checkout-testing-guide
  • /learn/playwright/clicking-typing-hovering
  • /learn/playwright/codegen
  • /learn/playwright/debugging
  • /learn/playwright/debugging-errors
  • /learn/playwright/debugging-with-ai-agents
  • /learn/playwright/emulating-mobile-devices
  • /learn/playwright/error-click-not-executed
  • /learn/playwright/error-element-not-found
  • /learn/playwright/error-element-not-visible
  • /learn/playwright/error-target-closed
  • /learn/playwright/error-wait-not-respected
  • /learn/playwright/file-download
  • /learn/playwright/generating-pdfs
  • /learn/playwright/google-login-automation
  • /learn/playwright/handling-test-data
  • /learn/playwright/how-to-detect-broken-links
  • /learn/playwright/how-to-parameterize-playwright-projects
  • /learn/playwright/how-to-search
  • /learn/playwright/iframe-interaction
  • /learn/playwright/intercept-requests
  • /learn/playwright/login-automation
  • /learn/playwright/microsoft-login-automation
  • /learn/playwright/mock-api
  • /learn/playwright/multitab-flows
  • /learn/playwright/navigation
  • /learn/playwright/performance
  • /learn/playwright/scraping-behind-login
  • /learn/playwright/script-recorders
  • /learn/playwright/selectors
  • /learn/playwright/steps-decorators
  • /learn/playwright/taking-screenshots
  • /learn/playwright/test-fixtures
  • /learn/playwright/testing-apis
  • /learn/playwright/testing-coupons
  • /learn/playwright/testing-file-uploads
  • /learn/playwright/testing-in-parallel
  • /learn/playwright/user-signup-automation
  • /learn/playwright/waits-and-timeouts
  • /learn/playwright/web-scraping
  • /learn/playwright/what-is-playwright
  • /learn/playwright/writing-tests

Mintlify's production build only supports Tailwind v3 classes without
arbitrary values, and its Tailwind v4 @Property registrations break v3
gradient utilities entirely (stops fall back to transparent). This left
the sign-up CTA invisible in production while looking fine in mint dev.

- sign-up-cta: move all styling to style.css (.sign-up-cta classes)
- cli-tip: replace text-[#0075FF] with a.cli-tip-link in style.css
- setup-flow: move dark:bg-white/[0.02] and min-h-[64px] into the
  component's own style block
@mintlify

mintlify Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
checkly-422f444a 🟢 Ready View Preview Jul 31, 2026, 10:40 AM

The arbitrary text-[#0075FF] value renders fine in production today,
so leave it untouched and scope this PR to the actually broken styles.
Its arbitrary values render fine in production today; scope this PR
to the actually broken sign-up CTA.
@stefanjudis
stefanjudis enabled auto-merge July 31, 2026 10:50
@stefanjudis
stefanjudis merged commit 35547cb into main Jul 31, 2026
6 checks passed
@stefanjudis
stefanjudis deleted the fix/sign-up-cta-prod-styles branch July 31, 2026 10:51
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