punkyard_obsidian-lindar/styles.css
pun kyard cedbe790cd
feat(#62): render task checkboxes as calendar bars + task creation modal (#63)
Co-authored-by: nmn <punkyard@users.noreply.github.com>
2026-07-04 03:45:11 +02:00

722 lines
17 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.14rem 0.2rem;
margin-bottom: 0.6rem;
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-nav-bar .linear-calendar-year-btn {
font-weight: 650;
font-size: 0.86rem;
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: color-mix(in srgb, var(--text-muted) 12%, var(--background-primary));
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);
flex: 0 0 auto;
}
.linear-calendar-header-row-top {
position: relative;
z-index: 2;
}
.linear-calendar-header-row-bottom {
position: relative;
z-index: 2;
}
.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);
}
.linear-calendar-weekday-cell.linear-calendar-wednesday {
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;
min-height: 24px;
position: relative;
overflow: hidden;
background-color: var(--background-primary);
--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;
}
.linear-calendar-cell.linear-calendar-weekend {
background-color: var(--linear-calendar-weekend-bg);
}
.linear-calendar-cell.linear-calendar-wednesday {
background-color: var(--linear-calendar-weekend-bg);
}
.linear-calendar-cell.linear-calendar-weekend.linear-calendar-empty {
background-color: transparent;
}
.linear-calendar-cell.linear-calendar-wednesday.linear-calendar-empty {
background-color: transparent;
}
/* Header row rounded corners */
.linear-calendar-header-row-top .linear-calendar-weekday-cell.linear-calendar-weekend-start {
border-radius: 4px 0 0 0;
}
.linear-calendar-header-row-top .linear-calendar-weekday-cell.linear-calendar-weekend-end {
border-radius: 0 4px 0 0;
}
.linear-calendar-header-row-top .linear-calendar-weekday-cell.linear-calendar-wednesday {
border-radius: 4px 4px 0 0;
}
.linear-calendar-header-row-bottom .linear-calendar-weekday-cell.linear-calendar-weekend-start {
border-radius: 0 0 0 4px;
}
.linear-calendar-header-row-bottom .linear-calendar-weekday-cell.linear-calendar-weekend-end {
border-radius: 0 0 4px 0;
}
.linear-calendar-header-row-bottom .linear-calendar-weekday-cell.linear-calendar-wednesday {
border-radius: 0 0 4px 4px;
}
.linear-calendar-cell.linear-calendar-today {
background-color: color-mix(in srgb, var(--linear-calendar-today-color, var(--interactive-accent)) 20%, transparent);
border-radius: 4px;
}
.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;
left: 50%;
transform: translateX(-50%);
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-image: linear-gradient(rgba(255,255,255,0.08), rgba(255,255,255,0.08));
}
/* 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;
/* hide scrollbar while keeping scroll functionality */
scrollbar-width: none;
}
.linear-calendar-month-row-scrollable {
position: relative;
}
.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;
}
/* Task bars — bordered outline */
.linear-calendar-task-bar {
align-self: stretch;
height: var(--linear-calendar-event-lane-height);
padding: 0 4px;
border-radius: 6px;
background: transparent;
border: 1.5px solid var(--task-color);
color: var(--task-color);
font-size: 0.58rem;
font-weight: 600;
line-height: calc(var(--linear-calendar-event-lane-height) - 3px);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
pointer-events: auto;
min-width: 0;
transition: background-color 0.14s ease, box-shadow 0.14s ease;
}
.linear-calendar-task-bar:hover {
background-color: color-mix(in srgb, var(--task-color) 15%, transparent);
box-shadow: 0 0 0 1px var(--task-color);
}
/* 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;
justify-content: space-between;
margin-top: 16px;
}
.linear-calendar-event-modal .linear-calendar-modal-buttons-left {
display: flex;
gap: 8px;
}
.linear-calendar-event-modal .linear-calendar-modal-buttons-right {
display: flex;
gap: 8px;
align-items: center;
}
.linear-calendar-event-modal .linear-calendar-delete-btn {
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);
}
/* Custom combobox for category selector */
.linear-calendar-combobox {
position: relative;
display: flex;
align-items: center;
}
.linear-calendar-combobox input {
flex: 1;
padding: 6px 30px 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;
width: 100%;
}
.linear-calendar-combobox-toggle {
position: absolute;
right: 2px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
cursor: pointer;
padding: 4px 6px;
font-size: 0.75rem;
line-height: 1;
color: var(--text-muted);
border-radius: 3px;
}
.linear-calendar-combobox-toggle:hover {
background-color: var(--background-modifier-hover);
}
.linear-calendar-combobox-list {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
z-index: 100;
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
max-height: 200px;
overflow-y: auto;
margin: 2px 0 0;
padding: 0;
list-style: none;
}
.linear-calendar-combobox-list.linear-calendar-combobox-open {
display: block;
}
.linear-calendar-combobox-list li {
padding: 6px 10px;
cursor: pointer;
font-size: 0.9rem;
color: var(--text-normal);
transition: background-color 0.1s ease;
}
.linear-calendar-combobox-list li:hover {
background-color: var(--background-modifier-hover);
}
.linear-calendar-combobox-list li.linear-calendar-combobox-selected {
background-color: var(--background-modifier-hover);
}
/* Category settings rows */
.linear-calendar-category-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 4px 10px;
min-height: 42px;
}
.linear-calendar-category-row:not(:last-child) {
border-bottom: 1px solid var(--background-modifier-border);
}
.linear-calendar-category-left {
display: flex;
align-items: center;
gap: 6px;
flex: 1;
}
.linear-calendar-category-left input[type="text"] {
flex: 1;
max-width: 200px;
height: var(--input-height);
padding: 0 8px;
border: 1px solid var(--background-modifier-border);
border-radius: var(--input-radius);
background-color: var(--background-primary);
color: var(--text-normal);
font-size: var(--font-ui-small);
}
.linear-calendar-category-left input[type="color"] {
width: 28px;
height: 28px;
padding: 0;
border: 1px solid var(--background-modifier-border);
border-radius: var(--input-radius);
cursor: pointer;
background: none;
}
.linear-calendar-category-controls {
display: flex;
align-items: center;
flex-shrink: 0;
}
.linear-calendar-category-inline.setting-item {
border: none;
padding: 0;
}
.linear-calendar-category-inline .setting-item-info {
display: none;
}
.linear-calendar-category-inline .setting-item-control {
gap: 6px;
}
.linear-calendar-category-disabled {
opacity: 0.5;
}
/* Mobile: single-letter days, 2-letter months */
@media (max-width: 600px) {
.linear-calendar-weekday-cell {
font-size: 0;
}
.linear-calendar-weekday-cell::before {
content: attr(data-mb);
font-size: 0.66rem;
font-weight: 600;
}
.linear-calendar-month-label {
font-weight: 600;
text-align: center;
font-size: 0;
}
.linear-calendar-month-label::before {
content: attr(data-mb);
font-size: 0.66rem;
font-weight: 600;
}
}