mirror of
https://github.com/punkyard/obsidian-lindar.git
synced 2026-07-22 07:45:03 +00:00
495 lines
12 KiB
CSS
495 lines
12 KiB
CSS
/* Linear Calendar plugin styles — lean, neat, pure */
|
|
|
|
/* View container */
|
|
.linear-calendar-view {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
min-height: 0;
|
|
width: 100%;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
background-color: var(--background-primary);
|
|
}
|
|
|
|
.linear-calendar-nav-bar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 0.28rem 0.2rem 0.24rem 0.16rem;
|
|
border-bottom: none;
|
|
background-color: var(--background-primary);
|
|
flex-shrink: 0;
|
|
gap: 0.35rem;
|
|
}
|
|
|
|
.linear-calendar-year-controls {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.08rem;
|
|
position: relative;
|
|
}
|
|
|
|
.linear-calendar-year-btn {
|
|
font-weight: 650 !important;
|
|
font-size: 0.86rem !important;
|
|
min-width: 3.1rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.linear-calendar-nav-bar button {
|
|
padding: 0.06rem 0.26rem;
|
|
font-size: 0.8rem;
|
|
background-color: color-mix(in srgb, var(--background-secondary) 62%, transparent);
|
|
border: 1px solid color-mix(in srgb, var(--background-modifier-border) 48%, transparent);
|
|
border-radius: 3px;
|
|
box-shadow: none;
|
|
cursor: pointer;
|
|
transition: background-color 0.15s ease, border-color 0.15s ease;
|
|
line-height: 1.05;
|
|
}
|
|
|
|
.linear-calendar-nav-bar button:hover {
|
|
background-color: color-mix(in srgb, var(--background-modifier-hover) 62%, transparent);
|
|
border-color: color-mix(in srgb, var(--background-modifier-border) 75%, transparent);
|
|
}
|
|
|
|
.linear-calendar-motto-display {
|
|
font-size: 0.85rem;
|
|
font-style: italic;
|
|
color: var(--text-muted);
|
|
text-align: right;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* Calendar container */
|
|
.linear-calendar-calendar-container {
|
|
flex: 1;
|
|
display: flex;
|
|
overflow-x: auto;
|
|
overflow-y: hidden;
|
|
background-color: var(--background-primary);
|
|
min-height: 0;
|
|
width: 100%;
|
|
scrollbar-gutter: stable both-edges;
|
|
}
|
|
|
|
.linear-calendar-calendar-container.linear-calendar-mode-compact {
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.linear-calendar-calendar-container.linear-calendar-mode-adaptive {
|
|
overflow-y: hidden;
|
|
}
|
|
|
|
.linear-calendar-calendar {
|
|
display: block;
|
|
min-width: 100%;
|
|
position: relative;
|
|
}
|
|
|
|
.linear-calendar-wrapper {
|
|
--linear-calendar-weekday-row-height: 18px;
|
|
--linear-calendar-weekend-bg: var(--background-secondary);
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: max-content;
|
|
min-width: 100%;
|
|
min-height: 100%;
|
|
}
|
|
|
|
.linear-calendar-wrapper-scrollable-months {
|
|
height: 100%;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.linear-calendar-wrapper-compact-months {
|
|
overflow: visible;
|
|
}
|
|
|
|
.linear-calendar-months-grid {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 0 0 auto;
|
|
min-height: 0;
|
|
overflow: visible;
|
|
}
|
|
|
|
.linear-calendar-wrapper-scrollable-months .linear-calendar-months-grid {
|
|
flex: 0 0 auto;
|
|
max-height: calc(100% - (var(--linear-calendar-weekday-row-height) * 2));
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
/* Header row — weekday labels + motto */
|
|
.linear-calendar-header-row {
|
|
display: grid;
|
|
grid-template-columns: 60px repeat(37, minmax(22px, 1fr)) 60px;
|
|
gap: 0;
|
|
height: var(--linear-calendar-weekday-row-height);
|
|
min-height: var(--linear-calendar-weekday-row-height);
|
|
background-color: var(--background-primary);
|
|
border-bottom: 1px solid color-mix(in srgb, var(--background-modifier-border) 65%, transparent);
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.linear-calendar-header-row-top {
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
.linear-calendar-header-row-bottom {
|
|
position: relative;
|
|
z-index: 2;
|
|
border-top: 1px solid color-mix(in srgb, var(--background-modifier-border) 65%, transparent);
|
|
border-bottom: none;
|
|
}
|
|
|
|
.linear-calendar-weekday-side {
|
|
background-color: var(--background-primary);
|
|
}
|
|
|
|
.linear-calendar-weekday-cell {
|
|
padding: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-align: center;
|
|
font-size: 0.66rem;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
background-color: var(--background-primary);
|
|
line-height: 1;
|
|
}
|
|
|
|
.linear-calendar-weekday-cell.linear-calendar-weekend {
|
|
background-color: var(--linear-calendar-weekend-bg);
|
|
}
|
|
|
|
/* Month rows */
|
|
.linear-calendar-month-row {
|
|
display: grid;
|
|
grid-template-columns: 60px repeat(37, minmax(22px, 1fr)) 60px;
|
|
gap: 0;
|
|
border-bottom: 1px solid color-mix(in srgb, var(--background-modifier-border) 25%, transparent);
|
|
min-height: 24px;
|
|
overflow: hidden;
|
|
position: relative;
|
|
--linear-calendar-event-lane-height: 14px;
|
|
--linear-calendar-event-lane-gap: 1px;
|
|
--linear-calendar-event-top-offset: 17px;
|
|
--linear-calendar-visible-event-lanes: 0;
|
|
--linear-calendar-visible-event-gaps: 0;
|
|
--linear-calendar-total-event-lanes: 1;
|
|
}
|
|
|
|
/* Month label (sticky left) */
|
|
.linear-calendar-month-label {
|
|
position: sticky;
|
|
left: 0;
|
|
z-index: 4;
|
|
padding: 0.2rem;
|
|
font-weight: 600;
|
|
text-align: center;
|
|
font-size: 0.66rem;
|
|
background-color: var(--background-primary);
|
|
min-height: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
/* Month label (sticky right) */
|
|
.linear-calendar-month-label-right {
|
|
position: sticky;
|
|
right: 0;
|
|
z-index: 4;
|
|
left: auto;
|
|
}
|
|
|
|
/* Day cells */
|
|
.linear-calendar-cell {
|
|
position: relative;
|
|
min-height: 0;
|
|
padding: 2px 3px 3px;
|
|
background-color: var(--background-primary);
|
|
font-size: 0.7rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
z-index: 1;
|
|
}
|
|
|
|
.linear-calendar-cell.linear-calendar-empty {
|
|
background-color: transparent;
|
|
opacity: 0.2;
|
|
}
|
|
|
|
.linear-calendar-cell.linear-calendar-weekend {
|
|
background-color: var(--linear-calendar-weekend-bg);
|
|
}
|
|
|
|
.linear-calendar-cell.linear-calendar-today {
|
|
border-right: none;
|
|
}
|
|
|
|
.linear-calendar-cell.linear-calendar-today .linear-calendar-date-number {
|
|
color: var(--linear-calendar-today-text-color, #fff);
|
|
z-index: 3;
|
|
min-width: 14px;
|
|
height: 14px;
|
|
padding: 0 3px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 999px;
|
|
background-color: var(--linear-calendar-today-color, var(--interactive-accent));
|
|
}
|
|
|
|
.linear-calendar-cell.linear-calendar-today .linear-calendar-date-number::before {
|
|
content: none;
|
|
}
|
|
|
|
/* Week number — top-left, very subtle */
|
|
.linear-calendar-week-number {
|
|
position: absolute;
|
|
top: 2px;
|
|
left: 3px;
|
|
font-size: 0.6rem;
|
|
font-weight: normal;
|
|
color: var(--text-muted);
|
|
opacity: 0.4;
|
|
line-height: 1;
|
|
z-index: 2;
|
|
}
|
|
|
|
/* Date number — top-right, bright on today */
|
|
.linear-calendar-date-number {
|
|
position: absolute;
|
|
top: 2px;
|
|
right: 4px;
|
|
font-size: 0.68rem;
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
opacity: 0.9;
|
|
z-index: 2;
|
|
}
|
|
|
|
/* Year dropdown */
|
|
.linear-calendar-year-dropdown {
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
margin-top: 4px;
|
|
background-color: var(--background-primary);
|
|
border: 1px solid color-mix(in srgb, var(--background-modifier-border) 78%, transparent);
|
|
border-radius: 4px;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
|
|
z-index: 100;
|
|
max-height: 300px;
|
|
min-width: 4.25rem;
|
|
}
|
|
|
|
.linear-calendar-year-dropdown-scroll {
|
|
overflow-y: auto;
|
|
max-height: 280px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.linear-calendar-year-option {
|
|
padding: 0.5rem 1rem;
|
|
cursor: pointer;
|
|
text-align: center;
|
|
transition: background-color 0.1s ease;
|
|
font-size: 0.9rem;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.linear-calendar-year-option:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.linear-calendar-year-option.linear-calendar-year-current {
|
|
font-weight: 700;
|
|
background-color: color-mix(in srgb, var(--background-secondary) 35%, var(--background-modifier-hover));
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
/* Clickable date cells */
|
|
.linear-calendar-cell-clickable {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.linear-calendar-cell-clickable:hover {
|
|
background-color: color-mix(in srgb, var(--background-modifier-hover) 68%, var(--background-primary));
|
|
}
|
|
|
|
.linear-calendar-cell.linear-calendar-weekend.linear-calendar-cell-clickable:hover {
|
|
background-color: color-mix(in srgb, var(--background-modifier-hover) 68%, var(--linear-calendar-weekend-bg));
|
|
}
|
|
|
|
/* Month-row event layer (below date numbers, above cells) */
|
|
.linear-calendar-events-layer {
|
|
position: absolute;
|
|
top: var(--linear-calendar-event-top-offset);
|
|
left: 60px;
|
|
right: 60px;
|
|
height: calc(var(--linear-calendar-visible-event-lanes) * var(--linear-calendar-event-lane-height) + var(--linear-calendar-visible-event-gaps) * var(--linear-calendar-event-lane-gap));
|
|
display: grid;
|
|
grid-template-columns: repeat(37, minmax(22px, 1fr));
|
|
grid-template-rows: repeat(var(--linear-calendar-total-event-lanes), var(--linear-calendar-event-lane-height));
|
|
grid-auto-rows: var(--linear-calendar-event-lane-height);
|
|
row-gap: var(--linear-calendar-event-lane-gap);
|
|
pointer-events: none;
|
|
z-index: 3;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.linear-calendar-events-layer-scrollable {
|
|
overflow-y: auto;
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
.linear-calendar-month-row-scrollable {
|
|
position: relative;
|
|
}
|
|
|
|
.linear-calendar-month-row-scrollable::after {
|
|
content: "";
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 60px;
|
|
right: 60px;
|
|
height: 6px;
|
|
background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--background-primary) 70%, transparent));
|
|
z-index: 5;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.linear-calendar-event-bar {
|
|
align-self: stretch;
|
|
height: var(--linear-calendar-event-lane-height);
|
|
padding: 0 4px;
|
|
border-radius: 6px;
|
|
background-color: var(--event-color, var(--interactive-accent));
|
|
background-image: linear-gradient(transparent, transparent);
|
|
color: var(--event-text-color, #fff);
|
|
font-size: 0.58rem;
|
|
font-weight: 600;
|
|
letter-spacing: 0;
|
|
line-height: var(--linear-calendar-event-lane-height);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
cursor: pointer;
|
|
pointer-events: auto;
|
|
min-width: 0;
|
|
filter: brightness(0.88) saturate(0.90);
|
|
transition: filter 0.14s ease, box-shadow 0.14s ease, background-image 0.14s ease;
|
|
}
|
|
|
|
.linear-calendar-event-bar:hover,
|
|
.linear-calendar-event-bar.linear-calendar-event-bar-linked-hover {
|
|
background-image: linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12));
|
|
filter: brightness(1.02) saturate(1.04);
|
|
box-shadow:
|
|
inset 0 0 0 1px rgba(255, 255, 255, 0.28),
|
|
0 0 0 1px rgba(0, 0, 0, 0.30);
|
|
}
|
|
|
|
.linear-calendar-event-bar.linear-calendar-event-bar-dark:hover,
|
|
.linear-calendar-event-bar.linear-calendar-event-bar-dark.linear-calendar-event-bar-linked-hover {
|
|
background-image: linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18));
|
|
filter: brightness(1.10) saturate(1.00);
|
|
box-shadow:
|
|
inset 0 0 0 1px rgba(255, 255, 255, 0.13),
|
|
0 0 0 1px rgba(0, 0, 0, 0.14);
|
|
}
|
|
|
|
.linear-calendar-event-bar.linear-calendar-event-bar-light:hover,
|
|
.linear-calendar-event-bar.linear-calendar-event-bar-light.linear-calendar-event-bar-linked-hover {
|
|
background-image: linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08));
|
|
box-shadow:
|
|
inset 0 0 0 1px rgba(0, 0, 0, 0.22),
|
|
0 0 0 1px rgba(0, 0, 0, 0.38);
|
|
}
|
|
|
|
.linear-calendar-event-bar.linear-calendar-event-continues-left {
|
|
border-top-left-radius: 0;
|
|
border-bottom-left-radius: 0;
|
|
padding-left: 4px;
|
|
}
|
|
|
|
.linear-calendar-event-bar.linear-calendar-event-continues-right {
|
|
border-top-right-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
padding-right: 4px;
|
|
}
|
|
|
|
/* Event modal */
|
|
.linear-calendar-event-modal .linear-calendar-modal-field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.linear-calendar-event-modal .linear-calendar-modal-field label {
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
|
|
.linear-calendar-event-modal .linear-calendar-modal-field input[type="text"],
|
|
.linear-calendar-event-modal .linear-calendar-modal-field input[type="date"],
|
|
.linear-calendar-event-modal .linear-calendar-modal-field textarea {
|
|
width: 100%;
|
|
padding: 6px 8px;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: 0.9rem;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.linear-calendar-event-modal .linear-calendar-modal-field-color {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.linear-calendar-event-modal .linear-calendar-modal-field-color input[type="color"] {
|
|
width: 36px;
|
|
height: 36px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
padding: 0;
|
|
cursor: pointer;
|
|
background: none;
|
|
}
|
|
|
|
.linear-calendar-event-modal .linear-calendar-modal-buttons {
|
|
display: flex;
|
|
gap: 8px;
|
|
justify-content: flex-end;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.linear-calendar-event-modal .linear-calendar-delete-btn {
|
|
margin-right: auto;
|
|
border-color: var(--color-red);
|
|
color: var(--color-red);
|
|
}
|
|
|
|
.linear-calendar-event-modal .linear-calendar-delete-btn:hover {
|
|
background-color: color-mix(in srgb, var(--color-red) 12%, transparent);
|
|
}
|