Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix weekdays spacing #300

Merged
merged 4 commits into from
Jan 31, 2024
Merged

fix weekdays spacing #300

merged 4 commits into from
Jan 31, 2024

Conversation

JacksonBowe
Copy link
Contributor

Line up the weekdays letters S-M-T-etc with the day columns

Copy link

Deploying with Cloudflare Pages

Name Result
Last commit: ea875d61
Status: ⚡️ Deployment in progress...
Preview URL: https://099f4772.shadcn-vue.pages.dev
Branch Preview URL: https://099f4772.shadcn-vue.pages.dev

@sadeghbarati
Copy link
Collaborator

sadeghbarati commented Jan 22, 2024

Hey, @JacksonBowe are you the one from Discord (Boo) right?

https://discord.com/channels/1121805548782878813/1198591092573098094

S-M-T-W-T-F-S looks Good

Just made Calendar width 100% and still look the way you describe on Discord

image

@@ -125,7 +125,13 @@ const vCalendarSlots = computed(() => {
@apply flex;
}
.calendar .vc-weekday {
@apply text-muted-foreground rounded-md w-9 font-normal text-[0.8rem];
@apply text-muted-foreground rounded-md w-full font-normal text-[0.8rem];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w-full is ok 👍

Comment on lines +130 to 135
.calendar .vc-weekday-1 {
@apply pr-3;
}
.calendar .vc-weekday-7 {
@apply pl-3;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But these styles are redundant I think

Can you explain what is these change for? Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sadeghbarati Yeah I'm Boo 😄. I noticed that all weeks elements had either an on-left or on-right class which was applying a left/right padding to the last/first vc-day.

I couldn't figure out how to apply that class so I brute forced it with padding.

I've just seen now that it's possible to change the first day of the week... so this change I've made is not good because it won't work for other first-day-of-week values.

Behaviour I was going for was to make the weekday letters line up with the day buttons. For example the two S weekdays in your image above are off-center.
image


Probably also worth noting that when you increase calendar width the "current day" has that large background color like in your image above. I "fixed" that like below adding the background to the day instead of the container. I didn't include in this PR because wasn't sure if it was intentional behaviour. The difference is also showcased in Before/After image.
image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JacksonBowe Thanks for explaining

Can you please also push your unincluded change for .v-day and vc-day.is-today 👍

Calendar.-.shadcn_vue.-.Google.Chrome.2024-01-23.06-18-43.mp4

@sadeghbarati sadeghbarati merged commit 8875261 into unovue:dev Jan 31, 2024
1 check passed
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