Skip to content

Build your personal knowledge base with Trilium Notes

1.8 KB
Raw Blame
.selectable-card-grid {
    display: grid;
    grid-template-columns: repeat(var(--selectable-card-columns, 3), 1fr);
    gap: 0.75em;
}

/* The grid columns get cramped on a phone — stack the cards into single-column rows instead. */
body.mobile .selectable-card-grid {
    grid-template-columns: 1fr;
}

.selectable-card {
    display: flex;
    align-items: center;
    gap: 0.75em;
    width: 100%;
    padding: 0.75em;
    text-align: left;
    border: 1px solid var(--main-border-color);
    border-radius: 8px;
    background: var(--accented-background-color);
    cursor: pointer;
}

/* `:where()` keeps this below the theme's `:root .selectable-card:hover`, which this file loads after. */
.selectable-card:hover:where(:not(:disabled)) {
    border-color: var(--main-text-color);
}

/* A choice that exists but can't be taken here. The icon and name fade so the tile
   reads as out of reach at a glance, while the description — which carries the
   reason — stays at its normal weight, since that is the one part still worth
   reading. */
.selectable-card:disabled {
    cursor: not-allowed;
    background: transparent;
}

.selectable-card:disabled .selectable-card-name,
.selectable-card:disabled .selectable-card-icon {
    opacity: 0.5;
}

.selectable-card.selected {
    border-color: var(--main-text-color);
    background: var(--active-item-background-color);
    color: var(--active-item-text-color);
}

.selectable-card-icon {
    flex-shrink: 0;
    font-size: 1.5em;
    line-height: 1;
}

.selectable-card-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.selectable-card-name {
    font-weight: 500;
}

.selectable-card-description {
    color: var(--muted-text-color);
    font-size: 0.85em;
}

.selectable-card.selected .selectable-card-description {
    color: inherit;
    opacity: 0.8;
}