Skip to content

Commit

Permalink
fix: calendar weeks alignment (#344)
Browse files Browse the repository at this point in the history
The component's CSS adds additional padding which results in Saturday and Sunday not being aligned with the rest of the days.


---------

Co-authored-by: Sadegh Barati <sadeghbaratiwork@gmail.com>
  • Loading branch information
gregmsanderson and sadeghbarati authored Feb 15, 2024
1 parent 999676a commit 406e4ff
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
10 changes: 2 additions & 8 deletions apps/www/src/lib/registry/default/ui/calendar/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,10 @@ const vCalendarSlots = computed(() => {
@apply mt-4;
}
.calendar .vc-weekdays {
@apply flex;
@apply justify-items-center;
}
.calendar .vc-weekday {
@apply text-muted-foreground rounded-md w-full font-normal text-[0.8rem];
}
.calendar .vc-weekday-1 {
@apply pr-3;
}
.calendar .vc-weekday-7 {
@apply pl-3;
@apply text-muted-foreground rounded-md font-normal text-[0.8rem];
}
.calendar .vc-weeks {
@apply w-full space-y-2 flex flex-col [&>_div]:grid [&>_div]:grid-cols-7;
Expand Down
10 changes: 2 additions & 8 deletions apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,10 @@ const vCalendarSlots = computed(() => {
@apply mt-4;
}
.calendar .vc-weekdays {
@apply flex;
@apply justify-items-center;
}
.calendar .vc-weekday {
@apply text-muted-foreground rounded-md w-full font-normal text-[0.8rem];
}
.calendar .vc-weekday-1 {
@apply pr-3;
}
.calendar .vc-weekday-7 {
@apply pl-3;
@apply text-muted-foreground rounded-md font-normal text-[0.8rem];
}
.calendar .vc-weeks {
@apply w-full space-y-2 flex flex-col [&>_div]:grid [&>_div]:grid-cols-7;
Expand Down
Loading

0 comments on commit 406e4ff

Please sign in to comment.