Files
mnote/src/app/globals.css
T
2025-11-29 05:16:23 +08:00

517 lines
13 KiB
CSS

@import url("https://rsms.me/inter/inter.css");
@import "tailwindcss";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar: var(--sidebar);
--color-chart-5: var(--chart-5);
--color-chart-4: var(--chart-4);
--color-chart-3: var(--chart-3);
--color-chart-2: var(--chart-2);
--color-chart-1: var(--chart-1);
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive: var(--destructive);
--color-accent-foreground: var(--accent-foreground);
--color-accent: var(--accent);
--color-muted-foreground: var(--muted-foreground);
--color-muted: var(--muted);
--color-secondary-foreground: var(--secondary-foreground);
--color-secondary: var(--secondary);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
--color-popover-foreground: var(--popover-foreground);
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
}
:root {
--radius: 0.625rem;
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.97 0 0);
--secondary-foreground: oklch(0.205 0 0);
--muted: oklch(0.97 0 0);
--muted-foreground: oklch(0.556 0 0);
--accent: oklch(0.97 0 0);
--accent-foreground: oklch(0.205 0 0);
--destructive: oklch(0.577 0.245 27.325);
--border: oklch(0.922 0 0);
--input: oklch(0.922 0 0);
--ring: oklch(0.708 0 0);
--chart-1: oklch(0.646 0.222 41.116);
--chart-2: oklch(0.6 0.118 184.704);
--chart-3: oklch(0.398 0.07 227.392);
--chart-4: oklch(0.828 0.189 84.429);
--chart-5: oklch(0.769 0.188 70.08);
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.145 0 0);
--sidebar-primary: oklch(0.205 0 0);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.97 0 0);
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.708 0 0);
}
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
--card: oklch(0.205 0 0);
--card-foreground: oklch(0.985 0 0);
--popover: oklch(0.205 0 0);
--popover-foreground: oklch(0.985 0 0);
--primary: oklch(0.922 0 0);
--primary-foreground: oklch(0.205 0 0);
--secondary: oklch(0.269 0 0);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.269 0 0);
--muted-foreground: oklch(0.708 0 0);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.704 0.191 22.216);
--border: oklch(1 0 0 / 10%);
--input: oklch(1 0 0 / 15%);
--ring: oklch(0.556 0 0);
--chart-1: oklch(0.488 0.243 264.376);
--chart-2: oklch(0.696 0.17 162.48);
--chart-3: oklch(0.769 0.188 70.08);
--chart-4: oklch(0.627 0.265 303.9);
--chart-5: oklch(0.645 0.246 16.439);
--sidebar: oklch(0.205 0 0);
--sidebar-foreground: oklch(0.985 0 0);
--sidebar-primary: oklch(0.488 0.243 264.376);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.269 0 0);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.556 0 0);
}
@layer base {
* {
@apply border-border outline-ring/50;
}
html {
font-family: "Inter", system-ui, sans-serif;
}
body {
@apply bg-background text-foreground;
}
}
@layer components {
.wolai-hover {
@apply transition-colors duration-150 hover:bg-gray-50;
}
.wolai-selected {
@apply border-l-2 border-blue-500 bg-blue-50;
}
.wolai-blue {
@apply cursor-pointer text-[#2563eb] hover:underline;
}
.wolai-editor .bn-block-outer {
padding: 2px 0;
}
.wolai-editor .bn-inline-content a {
color: #2563eb;
text-decoration: underline;
}
.wolai-editor .bn-drag-handle {
opacity: 0;
transition: opacity 0.2s ease;
}
.wolai-editor .bn-block-group:hover .bn-drag-handle {
opacity: 1;
}
.wolai-editor[data-heading-numbering="true"] {
counter-reset: wolai-h1 wolai-h2 wolai-h3 wolai-h4 wolai-h5;
}
.wolai-editor[data-heading-numbering="true"] h1 {
counter-increment: wolai-h1;
counter-reset: wolai-h2;
}
.wolai-editor[data-heading-numbering="true"] h1::before {
content: counter(wolai-h1) ". ";
color: #94a3b8;
margin-right: 8px;
}
.wolai-editor[data-heading-numbering="true"] h2 {
counter-increment: wolai-h2;
counter-reset: wolai-h3;
}
.wolai-editor[data-heading-numbering="true"] h2::before {
content: counter(wolai-h1) "." counter(wolai-h2) ". ";
color: #94a3b8;
margin-right: 6px;
}
.wolai-editor[data-heading-numbering="true"] h3 {
counter-increment: wolai-h3;
counter-reset: wolai-h4;
}
.wolai-editor[data-heading-numbering="true"] h3::before {
content: counter(wolai-h1) "." counter(wolai-h2) "." counter(wolai-h3) ". ";
color: #cbd5f5;
margin-right: 4px;
}
.wolai-editor[data-heading-numbering="true"] h4 {
counter-increment: wolai-h4;
counter-reset: wolai-h5;
}
.wolai-editor[data-heading-numbering="true"] h4::before {
content: counter(wolai-h1) "." counter(wolai-h2) "." counter(wolai-h3) "." counter(wolai-h4) ". ";
color: #d0d7e7;
margin-right: 4px;
}
.wolai-editor[data-heading-numbering="true"] h5 {
counter-increment: wolai-h5;
}
.wolai-editor[data-heading-numbering="true"] h5::before {
content: counter(wolai-h1) "." counter(wolai-h2) "." counter(wolai-h3) "." counter(wolai-h4) "." counter(wolai-h5) ". ";
color: #d4d4d8;
margin-right: 4px;
}
.wolai-editor-show-structure .bn-block-outer {
outline: 1px dashed #d4d4d8;
border-radius: 8px;
padding: 4px 8px;
}
.wolai-advanced-todo {
display: flex;
align-items: center;
gap: 10px;
}
.wolai-advanced-todo__status {
border-radius: 999px;
border: 1px solid #c7d2fe;
padding: 2px 10px;
font-size: 12px;
cursor: pointer;
background-color: #eef2ff;
color: #312e81;
}
.wolai-advanced-todo__status.status-doing {
border-color: #fcd34d;
background-color: #fff7ed;
color: #92400e;
}
.wolai-advanced-todo__status.status-done {
border-color: #4ade80;
background-color: #ecfdf5;
color: #047857;
}
.wolai-advanced-todo__status.status-cancelled {
border-color: #fecdd3;
background-color: #fff1f2;
color: #9f1239;
}
.wolai-progress {
border-radius: 12px;
padding: 12px;
border: 1px solid #e5e7eb;
background-color: #f8fafc;
margin: 8px 0;
}
.wolai-progress__header {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 12px;
color: #475569;
margin-bottom: 8px;
}
.wolai-progress__mode {
font-size: 11px;
border-radius: 12px;
background-color: #e0edff;
color: #1d4ed8;
padding: 2px 8px;
}
.wolai-progress__bar {
position: relative;
width: 100%;
height: 10px;
border-radius: 999px;
background-color: #e4e4e7;
overflow: hidden;
cursor: pointer;
}
.wolai-progress__fill {
position: absolute;
top: 0;
left: 0;
bottom: 0;
border-radius: inherit;
background-image: linear-gradient(90deg, #60a5fa, #2563eb);
}
.wolai-progress__percent {
display: block;
margin-top: 6px;
font-size: 12px;
color: #1d4ed8;
font-weight: 600;
}
.wolai-progress__description {
font-size: 13px;
color: #6b7280;
margin-top: 6px;
}
.wolai-media {
position: relative;
margin: 24px 0;
border-radius: 18px;
}
.wolai-media::after {
content: "";
position: absolute;
inset: -8px;
border: 1px solid transparent;
border-radius: 24px;
transition: border-color 0.2s ease;
pointer-events: none;
}
.wolai-media:hover::after,
.wolai-media:focus-within::after {
border-color: rgba(37, 99, 235, 0.15);
}
.wolai-media--empty {
border: 1px dashed #bed5ff;
background-color: #fff;
padding: 20px;
border-radius: 16px;
}
.wolai-media__canvas {
position: relative;
border-radius: 18px;
overflow: hidden;
background-color: #fff;
box-shadow: 0 10px 40px rgba(15, 23, 42, 0.05);
margin: 0 auto;
}
.wolai-media__figure {
border-radius: inherit;
overflow: hidden;
background-color: #fff;
}
.wolai-media__figure img {
width: 100%;
border-radius: inherit;
object-fit: cover;
}
.wolai-media__figure--border img {
border: 1px solid #e2e8f0;
}
.wolai-media__figure figcaption {
padding: 8px 12px;
}
.wolai-media__figure--center figcaption {
text-align: center;
}
.wolai-media__figure--right figcaption {
text-align: right;
}
.wolai-media__quickbar {
position: absolute;
top: 12px;
right: 12px;
display: flex;
gap: 6px;
padding: 4px;
border-radius: 9999px;
background-color: rgba(15, 23, 42, 0.85);
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35);
opacity: 0;
transform: translateY(-4px);
transition: opacity 0.15s ease, transform 0.15s ease;
pointer-events: none;
}
.wolai-media:hover .wolai-media__quickbar,
.wolai-media:focus-within .wolai-media__quickbar {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}
.wolai-media__quickbutton {
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
border-radius: 9999px;
background-color: transparent;
color: #e2e8f0;
border: none;
cursor: pointer;
transition: background-color 0.15s ease, color 0.15s ease;
}
.wolai-media__quickbutton:hover,
.wolai-media__quickbutton:focus-visible {
background-color: rgba(255, 255, 255, 0.15);
color: #fff;
outline: none;
}
.wolai-media__hint {
margin-top: 6px;
font-size: 12px;
color: #94a3b8;
text-align: left;
}
.wolai-media__resize-handle {
position: absolute;
top: 50%;
width: 12px;
height: 44px;
border-radius: 2px;
background: rgba(15, 23, 42, 0.5);
transform: translateY(-50%);
opacity: 0;
transition: opacity 0.15s ease;
cursor: ew-resize;
z-index: 20;
}
.wolai-media__resize-handle--left {
left: -6px;
}
.wolai-media__resize-handle--right {
right: -6px;
}
.wolai-media:hover .wolai-media__resize-handle,
.wolai-media:focus-within .wolai-media__resize-handle {
opacity: 1;
}
.wolai-media__resize-handle.is-dragging {
background: rgba(37, 99, 235, 0.85);
}
.online-table-block {
position: relative;
}
.online-table-block:hover .wolai-table-resize-handle,
.online-table-block:focus-within .wolai-table-resize-handle {
opacity: 1;
}
.wolai-table-resize-handle {
position: absolute;
background: rgba(15, 23, 42, 0.45);
border-radius: 999px;
transition: opacity 0.15s ease, background 0.2s ease;
opacity: 0;
z-index: 40;
}
.wolai-table-resize-handle.is-dragging {
background: rgba(37, 99, 235, 0.9);
}
.wolai-table-resize-handle--left,
.wolai-table-resize-handle--right {
top: 50%;
width: 12px;
height: 48px;
transform: translateY(-50%);
cursor: ew-resize;
}
.wolai-table-resize-handle--left {
left: -6px;
}
.wolai-table-resize-handle--right {
right: -6px;
}
.wolai-table-resize-handle--top,
.wolai-table-resize-handle--bottom {
left: 50%;
width: 48px;
height: 12px;
transform: translateX(-50%);
cursor: ns-resize;
}
.wolai-table-resize-handle--top {
top: -6px;
}
.wolai-table-resize-handle--bottom {
bottom: -6px;
}
.wolai-table-resize-handle--top-left,
.wolai-table-resize-handle--top-right,
.wolai-table-resize-handle--bottom-left,
.wolai-table-resize-handle--bottom-right {
width: 16px;
height: 16px;
border-radius: 4px;
}
.wolai-table-resize-handle--top-left {
top: -8px;
left: -8px;
cursor: nwse-resize;
}
.wolai-table-resize-handle--bottom-right {
bottom: -8px;
right: -8px;
cursor: nwse-resize;
}
.wolai-table-resize-handle--top-right {
top: -8px;
right: -8px;
cursor: nesw-resize;
}
.wolai-table-resize-handle--bottom-left {
bottom: -8px;
left: -8px;
cursor: nesw-resize;
}
.luckysheet-input-box {
opacity: 1 !important;
pointer-events: auto !important;
}
#luckysheet-rich-text-editor {
min-height: 24px;
font-size: 16px;
caret-color: #2563eb;
color: #111827;
}
#luckysheet-rich-text-editor:focus {
outline: 2px solid rgba(37, 99, 235, 0.2);
outline-offset: 2px;
}
}