-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
Description
The Oxide scanner in Tailwind CSS v4.2.2 fails to generate a CSS rule for max-h-[85vh] even though the class appears as a complete, unbroken literal string in a source file. The class is present in the rendered HTML but has no corresponding CSS rule — confirmed in both dev server and clean production builds (Vercel).
Reproduction
Environment:
- Tailwind CSS v4.2.2
- Next.js (monorepo with
apps/web/) - PostCSS config:
@tailwindcss/postcss - CSS entry:
@import "tailwindcss";(auto source detection)
File: apps/web/src/features/dashboard/docs/components/docs-document-dialog.tsx
// This class does NOT generate CSS:
<div className="max-h-[85vh] overflow-y-auto">...</div>Key observations:
max-h-[85vh]is a complete literal string in the source — not dynamically constructedmax-h-[90vh]in a different file (pricing-dialog.tsx) works perfectly and generates CSS- Other arbitrary value classes in the same file work (
rounded-[24px],bg-[#FFFEFB],shadow-[0_24px_80px_rgba(0,0,0,0.12)]) - The generated CSS contains
.max-h-\[90vh\] { max-height: 90vh; }but has zero85vhentries - Adding
style="max-height: 85vh"inline works — confirming it's purely a scanner/generation issue - Issue persists on clean production builds (Vercel) — not a dev server cache issue
Expected Behavior
max-h-[85vh] should generate .max-h-\[85vh\] { max-height: 85vh; } in the output CSS.
Actual Behavior
No CSS rule is generated. The class exists in the DOM but has no effect.
Workaround
Using max-h-[90vh] (which was already generated from another file) works. Adding the class as a CSS comment (/* max-h-[85vh] */) in globals.css also forces the scanner to detect it.