Skip to content

Fix CSS custom property syntax in calendar component#129

Merged
eswan18 merged 1 commit into
mainfrom
claude/fix-issue-128-r3QkK
Apr 5, 2026
Merged

Fix CSS custom property syntax in calendar component#129
eswan18 merged 1 commit into
mainfrom
claude/fix-issue-128-r3QkK

Conversation

@eswan18
Copy link
Copy Markdown
Owner

@eswan18 eswan18 commented Apr 5, 2026

Summary

Updated the calendar component to use correct CSS custom property syntax in Tailwind classes, changing from bracket notation [--var] to parenthesis notation (--var).

Key Changes

  • Converted all CSS custom property references from [--cell-size] to (--cell-size) syntax across the component
  • Updated affected Tailwind classes:
    • h-[--cell-size]h-(--cell-size)
    • w-[--cell-size]w-(--cell-size)
    • px-[--cell-size]px-(--cell-size)
    • size-[--cell-size]size-(--cell-size)
    • min-w-[--cell-size]min-w-(--cell-size)
  • Removed unnecessary min-w-[280px] constraint from root calendar class
  • Removed min-w-[280px] from month class (now just flex w-full)
  • Standardized semicolon usage throughout the file (removed trailing semicolons from imports and statements to match project style)
  • Cleaned up trailing commas in function arguments for consistency

Implementation Details

The parenthesis notation (--var) is the correct syntax for referencing CSS custom properties in modern Tailwind CSS, providing better compatibility and consistency with the framework's design system.

https://claude.ai/code/session_01BaxphtzayVB1ianzzf7C3x

Pulls the latest shadcn `calendar` component to stay in sync with
upstream, then patches the CSS custom property references.

Tailwind v4 removed the `[--var]` shorthand for referencing CSS
custom properties in favor of `(--var)`. shadcn's calendar still ships
the v3-style `[--cell-size]` references, so after our Tailwind 4.2.1
bump the nav buttons, month caption, weekday header, and day cells
all lost their height/width and the datepicker popover collapsed onto
itself and overflowed its container.

https://claude.ai/code/session_01BaxphtzayVB1ianzzf7C3x
@eswan18 eswan18 merged commit 8fcaaab into main Apr 5, 2026
1 check passed
@eswan18 eswan18 deleted the claude/fix-issue-128-r3QkK branch April 5, 2026 19:23
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.

2 participants