Adds handling of fit to width bool

This commit is contained in:
Janus Knudsen 2025-08-05 21:56:06 +02:00
parent 58f98468a1
commit e6d6599a1e
5 changed files with 32 additions and 2 deletions

View file

@ -247,6 +247,7 @@ swp-week-header {
height: calc(var(--header-height) + var(--all-day-row-height)); /* Same calculation as spacers */
}
swp-day-header {
padding: 12px;
text-align: center;
@ -331,6 +332,16 @@ swp-scrollable-content::-webkit-scrollbar {
display: none;
}
/* Fit to width mode - disable horizontal scroll */
swp-calendar[data-fit-to-width="true"] swp-scrollable-content {
overflow-x: hidden;
}
/* Hide horizontal scrollbar by collapsing bottom row */
swp-calendar[data-fit-to-width="true"] swp-calendar-container {
grid-template-rows: auto 1fr 0px;
}
/* Time grid */
swp-time-grid {
position: relative;
@ -368,6 +379,7 @@ swp-grid-lines {
);
}
/* Day columns */
swp-day-columns {
position: absolute;
@ -377,6 +389,7 @@ swp-day-columns {
min-width: calc(var(--week-days) * var(--day-column-min-width)); /* Dynamic width */
}
swp-day-column {
position: relative;
border-right: 1px solid var(--color-grid-line);