Skip to content

Oxide scanner fails to detect arbitrary value class (max-h-[85vh]) in v4.2.2 #19863

@aslaii

Description

@aslaii

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:

  1. max-h-[85vh] is a complete literal string in the source — not dynamically constructed
  2. max-h-[90vh] in a different file (pricing-dialog.tsx) works perfectly and generates CSS
  3. Other arbitrary value classes in the same file work (rounded-[24px], bg-[#FFFEFB], shadow-[0_24px_80px_rgba(0,0,0,0.12)])
  4. The generated CSS contains .max-h-\[90vh\] { max-height: 90vh; } but has zero 85vh entries
  5. Adding style="max-height: 85vh" inline works — confirming it's purely a scanner/generation issue
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions