mirror of
https://github.com/usememos/memos.git
synced 2026-11-22 20:09:13 +01:00
101 lines
2.9 KiB
CSS
101 lines
2.9 KiB
CSS
@import "tailwindcss";
|
|
@import "tw-animate-css";
|
|
@import "./themes/default.css";
|
|
|
|
/*
|
|
* Rich text in the memo editor: everything outside its source mode, which shows the
|
|
* Markdown as text (the editor marks its root `.mbe-source-mode`). The editor applies
|
|
* memos' tag and mention classes in both modes, so the parts that draw a shape take
|
|
* this variant and source mode keeps the text and its color.
|
|
*/
|
|
@custom-variant rich (&:not(.mbe-source-mode *));
|
|
|
|
@layer base {
|
|
* {
|
|
@apply border-border outline-none ring-0;
|
|
scrollbar-color: color-mix(in oklch, var(--muted-foreground) 55%, transparent) transparent;
|
|
scrollbar-width: thin;
|
|
}
|
|
|
|
*::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
|
|
*::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
*::-webkit-scrollbar-thumb {
|
|
background-color: color-mix(in oklch, var(--muted-foreground) 45%, transparent);
|
|
border-radius: 999px;
|
|
}
|
|
|
|
*::-webkit-scrollbar-thumb:hover {
|
|
background-color: color-mix(in oklch, var(--muted-foreground) 65%, transparent);
|
|
}
|
|
|
|
body {
|
|
@apply bg-background text-foreground;
|
|
}
|
|
|
|
/* Search hits in memo bodies (CSS Custom Highlight API, registered by useSearchMatchHighlight).
|
|
A translucent wash of the theme's amber keeps the text's own color legible on every theme. */
|
|
::highlight(memo-search-match) {
|
|
background-color: color-mix(in oklch, var(--warning) 40%, transparent);
|
|
}
|
|
}
|
|
|
|
@layer components {
|
|
/* Mermaid diagrams drawn by Pele take the theme's colors; a new scheme recolors them live. */
|
|
.pele {
|
|
--pele-bg: var(--card);
|
|
--pele-fg: var(--foreground);
|
|
--pele-muted: var(--muted-foreground);
|
|
--pele-line: var(--foreground);
|
|
--pele-surface: var(--muted);
|
|
--pele-surface-alt: var(--accent);
|
|
--pele-border: var(--border);
|
|
--pele-accent: var(--primary);
|
|
--pele-critical: var(--destructive);
|
|
--pele-radius: calc(var(--radius) - 2px);
|
|
}
|
|
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
.memos-logo .memos-mark {
|
|
transition: transform 180ms ease-out;
|
|
}
|
|
|
|
.memos-brand-trigger:is(:hover, :focus-visible) .memos-mark,
|
|
.memos-logo:hover .memos-mark {
|
|
transform: translateY(-1px) rotate(-6deg);
|
|
}
|
|
}
|
|
|
|
.map-attribution-minimal .leaflet-control-attribution {
|
|
margin: 0 0.25rem 0.25rem 0 !important;
|
|
border-radius: 0.25rem;
|
|
background: color-mix(in oklch, var(--background) 90%, transparent);
|
|
color: var(--muted-foreground);
|
|
font-size: 10px;
|
|
line-height: 1rem;
|
|
padding: 0 0.25rem;
|
|
}
|
|
|
|
.map-attribution-minimal .leaflet-control-attribution a {
|
|
color: inherit;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.map-attribution-minimal .leaflet-control-attribution a:hover {
|
|
color: var(--foreground);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.map-attribution-minimal .leaflet-control-attribution a:focus-visible {
|
|
border-radius: 0.125rem;
|
|
outline: 2px solid var(--ring);
|
|
outline-offset: 1px;
|
|
}
|
|
}
|