Skip to content

Build your personal knowledge base with Trilium Notes

1.3 KB
Raw Blame
/* The name of whatever the pointer rests on: a place of the base map, or a drawn shape (see
   hover_name.ts). MapLibre puts its popups inside the map's own container, so these are scoped like
   everything else over the map. The box is MapLibre's, dressed in the tokens the app's own tooltips
   use, with fallbacks for the themes that do not define them. */
.geo-map-container .geo-hover-name .maplibregl-popup-content {
    padding: var(--tooltip-padding, 4px 9px);
    border-radius: var(--tooltip-border-radius, 5px);
    background: var(--tooltip-background-color);
    backdrop-filter: var(--tooltip-backdrop-filter);
    box-shadow: var(--tooltip-box-shadow, 2px 2px 8px rgba(0, 0, 0, 0.2));
    color: var(--tooltip-foreground-color, var(--main-text-color));
    font-family: var(--main-font-family);
    font-size: var(--tooltip-font-size, 0.9rem);
    /* The name would otherwise take the click meant for the thing it names. */
    pointer-events: none;
}

/* MapLibre draws the tip a hard white, which does not match the box on every theme. */
.geo-map-container .geo-hover-name .maplibregl-popup-tip {
    display: none;
}

.geo-map-container .geo-hover-name .geo-hover-name-label {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}