Fix CSS custom property syntax in calendar component#129
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
[--cell-size]to(--cell-size)syntax across the componenth-[--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)min-w-[280px]constraint from root calendar classmin-w-[280px]from month class (now justflex w-full)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