Files
mnote/rust/crates/mnote-web/src/ssr/styles.rs
T

2965 lines
71 KiB
Rust
Raw Normal View History

2026-04-29 12:24:44 +08:00
//! MNOTE CSS 样式常量
//!
//! 为所有 Leptos SSR 页面提供 wolai / Notion 风格样式,
//! 匹配 3100 (Next.js) 前端的 wolai 设计系统。
/// MNOTE 完整 CSS 样式字符串
///
/// Wolai / Notion 风格:白色背景、近黑正文、浅色侧栏、极简边框。
/// 覆盖所有页面组件使用的 class 和 id。
pub const MNOTE_CSS: &str = r##"
/* ===== 基础重置 ===== */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* ===== Wolai 设计变量(来自设计稿) ===== */
:root {
/* 背景色 */
--color-basic-50: #F7F7F5;
--color-basic-75: #F0F0EE;
--color-basic-100: #EBEBEB;
--color-basic-200: #E3E3E0;
--color-basic-300: #D4D4D1;
--color-basic-400: #C4C4C1;
--color-basic-500: #A9A9A6;
--color-basic-600: #9B9A97;
--color-basic-700: #6D6D69;
--color-basic-800: #504F4B;
--color-basic-900: #37352F;
/* wolai 语义变量 */
--wolai-bg: #FFFFFF;
--wolai-bg-sidebar: var(--color-basic-50);
--wolai-bg-hover: rgba(55, 53, 47, 0.08);
--wolai-bg-active: rgba(55, 53, 47, 0.12);
--wolai-text-primary: var(--color-basic-900);
--wolai-text-secondary: var(--color-basic-600);
--wolai-border: #E9E9E8;
--wolai-brand: #22A559;
--wolai-accent: #2563eb;
--wolai-accent-hover: #1d4ed8;
--wolai-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Helvetica, Arial, sans-serif;
--wolai-radius: 4px;
}
/* ===== 基础排版 ===== */
html, body {
height: 100%;
}
body {
font-family: var(--wolai-font-sans);
color: var(--wolai-text-primary);
background: var(--wolai-bg);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
a {
color: var(--wolai-accent);
text-decoration: none;
cursor: pointer;
}
a:hover {
color: var(--wolai-accent-hover);
}
.mnote-symbol {
width: 18px;
height: 18px;
display: inline-flex;
flex: 0 0 auto;
color: currentColor;
fill: none;
stroke: currentColor;
stroke-width: 1.9;
stroke-linecap: round;
stroke-linejoin: round;
vertical-align: -0.18em;
}
.mnote-symbol[data-icon="home"] {
stroke-width: 2;
}
.mnote-symbol--document {
width: 56px;
height: 56px;
stroke-width: 1.35;
}
2026-04-30 06:58:17 +08:00
.material-symbols-outlined {
font-family: var(--wolai-font-sans);
font-weight: normal;
font-style: normal;
font-size: 20px;
line-height: 1;
letter-spacing: 0;
text-transform: none;
display: inline-flex;
align-items: center;
justify-content: center;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-webkit-font-feature-settings: "liga";
-webkit-font-smoothing: antialiased;
font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}
.material-symbols-outlined::before {
content: "";
display: block;
width: 1em;
height: 1em;
background: currentColor;
-webkit-mask: var(--mnote-icon-mask) center / contain no-repeat;
mask: var(--mnote-icon-mask) center / contain no-repeat;
}
.material-symbols-outlined[data-icon="search"]::before { content: "⌕"; }
.material-symbols-outlined[data-icon="account_tree"]::before { content: "⌘"; }
.material-symbols-outlined[data-icon="bolt"]::before { content: "ϟ"; }
.material-symbols-outlined[data-icon="help"]::before { content: "?"; }
.material-symbols-outlined[data-icon="inventory_2"]::before { content: "▣"; }
.material-symbols-outlined[data-icon="more_horiz"]::before { content: "…"; }
.material-symbols-outlined[data-icon="menu"]::before { content: "☰"; }
.material-symbols-outlined[data-icon="home"]::before { content: "⌂"; }
.material-symbols-outlined[data-icon="star"]::before { content: "☆"; }
.material-symbols-outlined[data-icon="history"]::before { content: "◷"; }
.material-symbols-outlined[data-icon="auto_awesome"]::before { content: "✦"; }
.material-symbols-outlined[data-icon="folder_open"]::before,
.material-symbols-outlined[data-icon="drive_file_move"]::before { content: "▱"; }
.material-symbols-outlined[data-icon="delete"]::before { content: "⌫"; }
.material-symbols-outlined[data-icon="right_panel_open"]::before,
.material-symbols-outlined[data-icon="open_in_new"]::before { content: "↗"; }
.material-symbols-outlined[data-icon="share"]::before { content: "⇪"; }
.material-symbols-outlined[data-icon="link"]::before { content: "∞"; }
.material-symbols-outlined[data-icon="content_copy"]::before,
.material-symbols-outlined[data-icon="file_copy"]::before { content: "⧉"; }
.material-symbols-outlined[data-icon="tag"]::before { content: "#"; }
.material-symbols-outlined[data-icon="edit"]::before { content: "✎"; }
.material-symbols-outlined[data-icon="add"]::before { content: "+"; }
.material-symbols-outlined[data-icon="subdirectory_arrow_right"]::before { content: "↳"; }
.material-symbols-filled {
font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}
/* 本地 SVG mask 图标,避免 Google Material Symbols 字体未加载时露出英文图标名。 */
.material-symbols-outlined[data-icon]::before { content: ""; }
.material-symbols-outlined[data-icon="search"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.8 18a7.2 7.2 0 1 1 0-14.4 7.2 7.2 0 0 1 0 14.4Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='m16 16 4.2 4.2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="account_tree"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 6h4v4H6zM14 4h4v4h-4zM14 16h4v4h-4z' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='M10 8h2a2 2 0 0 0 2-2M10 8h2a2 2 0 0 1 2 2v8' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="bolt"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 2 4.5 13h6L9 22l10.5-13h-6z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="help"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M9.8 9a2.4 2.4 0 0 1 4.6 1.1c0 1.7-1.7 2-2.2 3.1' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17' r='1.1' fill='black'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="inventory_2"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5.5h16v4H4zM6 9.5h12V19H6z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M9.5 13.5h5' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="more_horiz"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='5' cy='12' r='2' fill='black'/%3E%3Ccircle cx='12' cy='12' r='2' fill='black'/%3E%3Ccircle cx='19' cy='12' r='2' fill='black'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="menu"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="home"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 11 12 4l8 7v9H5v-9Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M9.5 20v-6h5v6' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="star"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 3 2.7 5.4 6 .9-4.4 4.3 1 6-5.3-2.8-5.3 2.8 1-6-4.4-4.3 6-.9z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="history"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 12a8 8 0 1 0 2.3-5.7L4 8.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M4 4v4.5h4.5M12 8v5l3.5 2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="auto_awesome"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 3 1.6 5.2L19 10l-5.4 1.8L12 17l-1.6-5.2L5 10l5.4-1.8zM5.5 15.5l.8 2.2 2.2.8-2.2.8-.8 2.2-.8-2.2-2.2-.8 2.2-.8zM18.5 2.5l.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7z' fill='black'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="folder_open"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 7.5h6l2 2H21v8.5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-9a1.5 1.5 0 0 1 1.5-1.5Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M4 18 7 11h14l-3 7' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="drive_file_move"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6h6l2 2h8v10H4z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='m13 12 3 3-3 3M8 15h8' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="delete"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 6h14M9 6V4h6v2M8 6l1 14h6l1-14M10.5 10v6M13.5 10v6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="right_panel_open"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h16v14H4zM14 5v14M8 12h6M11 9l3 3-3 3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="preview"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.8' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="download"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4v10M8.5 11.5 12 15l3.5-3.5M5 19h14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="notes"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 5h12v14H6zM9 9h6M9 12h6M9 15h4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
2026-04-30 06:58:17 +08:00
.material-symbols-outlined[data-icon="open_in_new"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 6H5v13h13v-3M12 5h7v7M10 14 19 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="share"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='18' cy='5' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='6' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='18' cy='19' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m8.7 10.7 6.6-4.4M8.7 13.3l6.6 4.4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
2026-04-30 18:36:50 +08:00
.material-symbols-outlined[data-icon="comment"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 5h14v10H9l-4 4V5Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="mode_comment"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 5h14v10H9l-4 4V5Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
2026-04-30 18:36:50 +08:00
.material-symbols-outlined[data-icon="person_add"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='9' cy='8' r='3.2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M3.5 20a5.5 5.5 0 0 1 11 0M18 8v6M15 11h6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="slideshow"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h16v12H4z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='m10 9 5 2-5 2zM9 21h6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="article"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 4h12v16H6zM9 8h6M9 12h6M9 16h4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="sync"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6v5h-5M4 18v-5h5M7.5 9A6 6 0 0 1 18 6M16.5 15A6 6 0 0 1 6 18' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="drive_file_rename_outline"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m4 17-.5 3.5L7 20l11-11-3-3zM13 8l3 3M5 6h7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="format_paint"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7h10l2 3-2 3H5l-2-3zM9 13v6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
2026-04-30 06:58:17 +08:00
.material-symbols-outlined[data-icon="link"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.5 14.5 14.5 9.5M10.8 6.2l1.1-1.1a4 4 0 0 1 5.7 5.7l-1.6 1.6M13.2 17.8l-1.1 1.1a4 4 0 0 1-5.7-5.7L8 11.6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="content_copy"],
.material-symbols-outlined[data-icon="file_copy"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 8h10v12H8zM6 16H4V4h10v2' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="tag"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 4 5 20M19 4l-4 16M4 9h16M3 15h16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="edit"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m4 17-.5 3.5L7 20l11-11-3-3zM13 8l3 3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="add"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="subdirectory_arrow_right"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 4v7a3 3 0 0 0 3 3h8M14 10l4 4-4 4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="radio_button_unchecked"]::before {
width: .78em;
height: .78em;
background: transparent;
border: 2px solid currentColor;
border-radius: 999px;
-webkit-mask: none;
mask: none;
}
2026-04-29 12:24:44 +08:00
/* ===== 滚动条(悬停时显示) ===== */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: transparent;
border-radius: 4px;
}
:hover::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.1);
}
/* ===== 页面布局:侧栏 + 内容 ===== */
.mnote-shell {
display: flex;
height: 100vh;
width: 100%;
overflow: hidden;
background: var(--wolai-bg);
}
.wolai-workspace-shell {
--wolai-bg-sidebar: #F7F7F6;
--wolai-bg-selected: #F8E6E7;
--wolai-accent-red: #E0525B;
}
.wolai-sidebar {
width: 288px;
background: var(--wolai-bg-sidebar);
}
.wolai-sidebar-header {
height: 52px;
gap: 10px;
padding: 12px 16px 8px;
justify-content: flex-start;
position: relative;
2026-04-29 12:24:44 +08:00
}
.wolai-avatar {
width: 28px;
height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 4px;
background: #D6545D;
color: #fff;
font-size: 15px;
font-weight: 700;
flex: 0 0 auto;
}
.wolai-sidebar-header .sidebar-workspace-name {
max-width: 190px;
color: #202124;
font-size: 16px;
font-weight: 650;
}
.mnote-workspace-source-trigger {
min-width: 0;
flex: 1 1 auto;
display: inline-flex;
align-items: center;
gap: 4px;
border: 0;
background: transparent;
padding: 2px 4px;
border-radius: 4px;
cursor: pointer;
}
.mnote-workspace-source-trigger:hover,
.mnote-workspace-source-trigger[aria-expanded="true"] {
background: var(--wolai-bg-hover);
}
2026-04-29 12:24:44 +08:00
.wolai-sidebar-chevron {
margin-left: auto;
color: var(--wolai-text-secondary);
font-size: 16px;
}
.mnote-workspace-source-menu {
position: absolute;
inset-inline-start: 0;
top: calc(100% + 6px);
z-index: 120;
width: 250px;
max-width: calc(100vw - 24px);
padding: 6px;
border: 1px solid rgba(27, 28, 28, 0.12);
border-radius: 8px;
background: #fff;
box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}
.mnote-workspace-source-menu__label {
padding: 8px 8px 4px;
color: var(--wolai-text-secondary);
font-size: 12px;
}
.mnote-workspace-source-menu__item {
width: 100%;
display: block;
border: 0;
border-radius: 6px;
background: transparent;
padding: 8px;
color: var(--wolai-text-primary);
font-size: 13px;
line-height: 1.35;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
}
.mnote-workspace-source-menu__item:hover {
background: var(--wolai-bg-hover);
}
.mnote-workspace-source-menu__item--primary {
color: #1D4ED8;
}
2026-04-29 12:24:44 +08:00
.wolai-quick-actions {
flex: 0 0 auto;
display: grid;
2026-05-08 00:41:03 +08:00
grid-template-columns: repeat(7, 1fr);
2026-04-29 12:24:44 +08:00
gap: 8px;
padding: 8px 12px 18px;
}
2026-05-08 00:41:03 +08:00
.wolai-quick-actions a,
.wolai-quick-actions button {
2026-04-29 12:24:44 +08:00
height: 28px;
justify-content: center;
padding: 0;
margin: 0;
color: #4B4B4B;
2026-05-08 00:41:03 +08:00
border: 0;
background: transparent;
cursor: pointer;
2026-04-29 12:24:44 +08:00
}
2026-05-08 00:41:03 +08:00
.wolai-quick-actions a .nav-icon,
.wolai-quick-actions button .nav-icon {
2026-04-29 12:24:44 +08:00
margin: 0;
}
.wolai-sidebar-section {
padding: 4px 8px 14px;
}
.wolai-section-title {
height: 28px;
display: flex;
align-items: center;
gap: 4px;
color: #B5B5B2;
font-size: 14px;
padding: 0 8px;
}
.wolai-section-icon {
color: #FFB33F;
}
.wolai-section-caret {
color: #B5B5B2;
}
.wolai-section-add {
margin-left: auto;
2026-04-29 14:36:24 +08:00
width: 24px;
height: 24px;
border: 0;
border-radius: 6px;
background: transparent;
2026-04-29 12:24:44 +08:00
color: #B5B5B2;
2026-04-29 14:36:24 +08:00
font-size: 22px;
line-height: 1;
cursor: pointer;
}
.wolai-section-add:hover {
background: var(--wolai-bg-hover);
color: #555;
}
.mnote-empty-create-page {
margin-top: 14px;
height: 34px;
padding: 0 14px;
border: 1px solid var(--wolai-border);
border-radius: 6px;
background: #fff;
color: #333;
font-size: 14px;
cursor: pointer;
}
.mnote-empty-create-page:hover {
background: var(--wolai-bg-hover);
2026-04-29 12:24:44 +08:00
}
.wolai-page-row {
min-height: 38px;
display: flex;
align-items: center;
gap: 8px;
border-radius: 6px;
padding: 0 12px;
color: #535353;
font-size: 17px;
line-height: 1.2;
}
.wolai-page-row:hover {
background: var(--wolai-bg-hover);
color: #202124;
}
.wolai-muted-row {
color: #747471;
}
.wolai-active-row {
background: var(--wolai-bg-selected);
color: var(--wolai-accent-red);
}
.wolai-row-icon {
width: 22px;
color: #111;
text-align: center;
flex: 0 0 auto;
}
.wolai-sidebar-footer {
margin-top: auto;
display: grid;
grid-template-columns: 1fr 1fr;
border-top: 1px solid var(--wolai-border);
background: #FBFBFA;
}
.wolai-footer-entry {
height: 46px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
color: #6D6D69;
font-size: 15px;
}
.wolai-footer-entry + .wolai-footer-entry {
border-left: 1px solid var(--wolai-border);
}
.wolai-topbar {
height: 46px;
display: flex;
align-items: center;
justify-content: space-between;
flex: 0 0 auto;
padding: 0 18px;
color: #222;
font-size: 17px;
}
.wolai-topbar-left,
.wolai-topbar-actions {
display: flex;
align-items: center;
gap: 12px;
}
.wolai-topbar-actions {
color: #222;
font-size: 20px;
}
.wolai-menu-icon {
color: #4A4A4A;
font-size: 22px;
}
.wolai-home-icon {
color: #000;
font-size: 24px;
font-weight: 700;
}
.wolai-floating-actions {
position: fixed;
right: 24px;
bottom: 24px;
display: flex;
flex-direction: column;
gap: 16px;
z-index: 20;
}
.wolai-floating-button {
width: 50px;
height: 50px;
border: 1px solid #ECECF1;
border-radius: 50%;
background: #fff;
color: #222;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
font-size: 18px;
cursor: pointer;
}
/* 侧栏导航 */
.mnote-sidebar {
width: 288px;
flex-shrink: 0;
background: var(--wolai-bg-sidebar);
border-right: 1px solid var(--wolai-border);
display: flex;
flex-direction: column;
overflow-y: auto;
user-select: none;
}
.mnote-sidebar-header {
padding: 14px 16px 10px;
display: flex;
align-items: center;
justify-content: space-between;
}
.mnote-sidebar-brand {
font-size: 15px;
font-weight: 600;
color: var(--wolai-text-primary);
text-decoration: none;
}
.mnote-sidebar-brand:hover {
color: var(--wolai-text-primary);
}
.mnote-sidebar-nav {
flex: 1;
padding: 4px 8px;
}
2026-04-29 14:36:24 +08:00
.mnote-sidebar-nav.wolai-quick-actions {
flex: 0 0 auto;
}
.wolai-sidebar-body {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: column;
}
2026-05-08 00:41:03 +08:00
.mnote-sidebar-nav a,
.mnote-sidebar-nav button {
2026-04-29 12:24:44 +08:00
display: flex;
align-items: center;
height: 30px;
padding: 4px 8px;
margin-bottom: 2px;
border-radius: var(--wolai-radius);
font-size: 14px;
line-height: 1.4;
color: var(--wolai-text-primary);
text-decoration: none;
transition: none;
}
2026-05-08 00:41:03 +08:00
.mnote-sidebar-nav a:hover,
.mnote-sidebar-nav button:hover {
2026-04-29 12:24:44 +08:00
background: var(--wolai-bg-hover);
}
.mnote-sidebar-nav a.active {
background: var(--wolai-bg-active);
}
2026-05-08 00:41:03 +08:00
.mnote-sidebar-nav a .nav-icon,
.mnote-sidebar-nav button .nav-icon {
2026-04-29 12:24:44 +08:00
display: inline-flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
margin-right: 5px;
font-size: 18px;
flex-shrink: 0;
}
/* 工作区名称 */
.sidebar-workspace-name {
font-size: 12px;
color: var(--wolai-text-secondary);
max-width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 侧栏页面树区 */
.sidebar-tree-section {
border-top: 1px solid var(--wolai-border);
margin-top: 4px;
padding-top: 4px;
}
.sidebar-tree-divider {
display: none;
}
.sidebar-tree {
padding: 2px 0;
}
.sidebar-tree .tree-root {
list-style: none;
padding: 0;
margin: 0;
}
2026-04-29 14:36:24 +08:00
.sidebar-tree .tree-empty {
padding: 6px 8px 8px;
color: var(--wolai-text-secondary);
font-size: 13px;
line-height: 1.5;
}
2026-04-29 12:24:44 +08:00
.sidebar-tree .tree-node {
list-style: none;
padding: 0;
margin: 0;
}
.sidebar-tree .tree-row {
display: flex;
align-items: center;
height: 30px;
padding: 0 8px;
border-radius: var(--wolai-radius);
cursor: pointer;
font-size: 14px;
color: var(--wolai-text-primary);
gap: 2px;
}
.sidebar-tree .tree-row:hover {
background: var(--wolai-bg-hover);
}
.sidebar-tree .tree-row[data-active="true"] {
background: var(--wolai-bg-active);
}
.sidebar-tree .tree-row[data-active="true"] .tree-link-title {
font-weight: 500;
}
.sidebar-tree .tree-toggle {
display: inline-flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
flex-shrink: 0;
border: none;
background: none;
cursor: pointer;
font-size: 12px;
color: var(--wolai-text-secondary);
padding: 0;
border-radius: 3px;
}
.sidebar-tree .tree-toggle:hover {
background: var(--wolai-bg-hover);
}
.sidebar-tree .tree-spacer {
display: inline-flex;
width: 20px;
height: 20px;
flex-shrink: 0;
}
.sidebar-tree .tree-kind-badge {
display: none;
}
.sidebar-tree .tree-link {
flex: 1;
display: flex;
align-items: center;
border: none;
background: none;
cursor: pointer;
padding: 0 4px;
font-size: 14px;
color: var(--wolai-text-primary);
overflow: hidden;
min-width: 0;
}
.sidebar-tree .tree-link-title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sidebar-tree .tree-actions {
display: none;
gap: 2px;
flex-shrink: 0;
}
.sidebar-tree .tree-row:hover .tree-actions {
display: flex;
}
.sidebar-tree .tree-action {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
border: none;
background: none;
cursor: pointer;
font-size: 14px;
color: var(--wolai-text-secondary);
border-radius: 3px;
padding: 0;
}
.sidebar-tree .tree-action:hover {
background: var(--wolai-bg-hover);
}
.sidebar-tree .tree-children {
list-style: none;
padding: 0;
margin: 0;
}
.sidebar-tree .tree-children--collapsed {
display: none;
}
/* 树行缩进 — 通过嵌套深度自动偏移 */
.sidebar-tree .tree-node .tree-children .tree-row {
padding-left: 28px;
}
.sidebar-tree .tree-node .tree-children .tree-children .tree-row {
padding-left: 48px;
}
.sidebar-tree .tree-node .tree-children .tree-children .tree-children .tree-row {
padding-left: 68px;
}
.sidebar-tree .tree-node .tree-children .tree-children .tree-children .tree-children .tree-row {
padding-left: 88px;
}
/* 内容区域 */
.mnote-main {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--wolai-bg);
}
.mnote-content {
flex: 1;
overflow-y: auto;
padding: 0;
}
/* ===== 首页 ===== */
.mnote-home {
max-width: 720px;
margin: 0 auto;
padding: 72px 64px;
}
.mnote-home-icon {
width: 96px;
height: 96px;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 22px;
color: #000;
font-size: 92px;
line-height: 1;
}
.mnote-home h1 {
text-align: center;
font-size: 44px;
font-weight: 700;
letter-spacing: 0;
margin-bottom: 34px;
color: var(--wolai-text-primary);
}
.mnote-home p {
font-size: 16px;
color: var(--wolai-text-secondary);
line-height: 1.6;
margin-bottom: 32px;
}
.mnote-home-links {
display: flex;
flex-direction: column;
gap: 8px;
max-width: 360px;
margin: 0 auto;
}
.mnote-home-links a {
display: flex;
align-items: center;
gap: 8px;
padding: 2px 0;
border-radius: var(--wolai-radius);
font-size: 21px;
font-weight: 650;
color: var(--wolai-text-primary);
text-decoration: none;
transition: background-color 80ms ease;
}
.mnote-home-links a:hover {
background: var(--wolai-bg-hover);
}
.mnote-home-links a::before {
content: none;
}
.mnote-home-links a span {
width: 26px;
text-align: center;
color: #111;
}
/* ===== 文档壳 ===== */
.document-shell {
width: 100%;
min-height: 100vh;
margin: 0 auto;
}
.document-shell-header {
padding: 48px 0 0;
margin: 0 auto 8px;
max-width: 760px;
}
.document-shell-header h1 {
font-size: 40px;
font-weight: 700;
line-height: 1.2;
color: var(--wolai-text-primary);
word-break: break-word;
padding: 3px 0;
}
#mnote-editor-island {
margin: 0 15px;
max-width: 760px;
width: calc(100% - 30px);
min-height: 300px;
padding-bottom: 48px;
}
#mnote-editor-island .bn-editor {
padding: 0;
max-width: none;
margin: 0;
}
/* ===== 搜索壳 ===== */
#mnote-search-shell {
max-width: 800px;
min-height: 100vh;
margin: 0 auto;
padding: 48px 64px;
}
#mnote-search-shell header {
margin-bottom: 24px;
}
#mnote-search-shell h1 {
font-size: 32px;
font-weight: 700;
color: var(--wolai-text-primary);
margin-bottom: 4px;
}
.search-meta,
.search-query {
color: var(--wolai-text-secondary);
font-size: 14px;
}
#mnote-search-island {
min-height: 200px;
}
/* ===== 思维导图壳 ===== */
#mnote-mindmap-shell {
max-width: 1000px;
min-height: 100vh;
margin: 0 auto;
padding: 48px 64px;
}
#mnote-mindmap-shell header {
margin-bottom: 24px;
}
#mnote-mindmap-shell h1 {
font-size: 32px;
font-weight: 700;
color: var(--wolai-text-primary);
}
#mnote-mindmap-island {
min-height: 400px;
}
/* ===== 认证页面 ===== */
.mnote-auth {
2026-05-06 21:44:20 +08:00
position: relative;
display: grid;
min-height: 100vh;
place-items: center;
padding: 48px 20px;
background: #FFFFFF;
}
.mnote-auth-brand {
position: fixed;
top: 28px;
left: 34px;
display: inline-flex;
align-items: center;
gap: 10px;
color: #37352F;
font-size: 18px;
font-weight: 650;
letter-spacing: 0;
}
.mnote-auth-brand:hover {
color: #37352F;
}
.mnote-auth-brand-mark {
display: inline-flex;
width: 32px;
height: 32px;
2026-04-29 12:24:44 +08:00
align-items: center;
justify-content: center;
2026-05-06 21:44:20 +08:00
border-radius: 6px;
background: #37352F;
color: #FFF;
font-size: 18px;
2026-04-29 12:24:44 +08:00
font-weight: 700;
2026-05-06 21:44:20 +08:00
line-height: 1;
2026-04-29 12:24:44 +08:00
}
2026-05-06 21:44:20 +08:00
.mnote-auth-panel {
width: min(100%, 360px);
color: #37352F;
}
.mnote-auth-heading {
margin-bottom: 30px;
text-align: center;
}
.mnote-auth-heading h1 {
margin: 0 0 8px;
color: #37352F;
font-size: 28px;
font-weight: 650;
line-height: 1.25;
letter-spacing: 0;
}
.mnote-auth-heading p {
color: #9B9A97;
font-size: 14px;
2026-04-29 12:24:44 +08:00
line-height: 1.5;
}
2026-05-06 21:44:20 +08:00
.mnote-auth-form {
display: grid;
gap: 12px;
}
.mnote-auth-field {
display: grid;
gap: 7px;
color: #6D6D69;
font-size: 13px;
line-height: 1.3;
}
.mnote-auth-field input {
width: 100%;
height: 42px;
border: 1px solid #DCDAD6;
border-radius: 4px;
background: #FFF;
color: #37352F;
font: 400 15px/1.4 var(--wolai-font-sans);
letter-spacing: 0;
outline: none;
padding: 0 12px;
}
.mnote-auth-field input::placeholder {
color: #B5B1AA;
}
.mnote-auth-field input:focus {
border-color: #A8A39A;
box-shadow: 0 0 0 2px rgba(55, 53, 47, 0.08);
}
.mnote-auth-message {
min-height: 20px;
color: #9B9A97;
font-size: 13px;
line-height: 20px;
text-align: center;
}
.mnote-auth-message[data-type="error"] {
color: #D14343;
}
.mnote-auth-message[data-type="success"] {
color: #23834D;
}
.mnote-auth-submit {
width: 100%;
height: 42px;
border: 0;
border-radius: 4px;
background: #37352F;
color: #FFF;
cursor: pointer;
font: 600 15px/1 var(--wolai-font-sans);
letter-spacing: 0;
}
.mnote-auth-submit:hover {
background: #2F2D29;
}
.mnote-auth-submit:disabled {
cursor: default;
opacity: .58;
}
.mnote-auth-quick-login {
width: 100%;
height: 42px;
border: 1px solid #DCDAD6;
border-radius: 4px;
background: #FFF;
color: #37352F;
cursor: pointer;
font: 500 14px/1 var(--wolai-font-sans);
letter-spacing: 0;
}
.mnote-auth-quick-login:hover {
background: #F7F7F5;
}
.mnote-auth-quick-login:disabled {
cursor: default;
opacity: .58;
}
.mnote-auth-switch {
display: block;
margin: 18px auto 0;
border: 0;
background: transparent;
color: #6D6D69;
cursor: pointer;
font: 400 14px/1.4 var(--wolai-font-sans);
letter-spacing: 0;
}
.mnote-auth-switch:hover {
color: #37352F;
}
@media (max-width: 640px) {
.mnote-auth {
align-items: start;
padding-top: 132px;
}
.mnote-auth-brand {
top: 24px;
left: 22px;
}
}
2026-04-29 12:24:44 +08:00
/* ===== ProseMirror 兼容 ===== */
.ProseMirror {
white-space: pre-wrap;
word-break: break-word;
overflow-wrap: anywhere;
}
.ProseMirror pre {
white-space: pre-wrap;
}
/* ===== 响应式 ===== */
2026-04-30 18:36:50 +08:00
.wolai-search-overlay{position:fixed;inset:0;z-index:1200;display:flex;align-items:flex-start;justify-content:center;padding:92px 24px 24px;background:rgba(0,0,0,.32);pointer-events:none}
.wolai-search-overlay[hidden]{display:none!important}
2026-04-30 18:36:50 +08:00
.wolai-search-dialog{width:min(680px,100%);max-height:min(720px,calc(100vh - 128px));overflow:hidden;display:flex;flex-direction:column;background:#FFF;border:1px solid rgba(27,28,28,.10);border-radius:6px;box-shadow:0 18px 48px rgba(15,23,42,.22),0 2px 8px rgba(15,23,42,.08);color:#37352F;pointer-events:auto}
.wolai-search-input-row{display:flex;align-items:center;min-height:58px;padding:0 12px 0 18px;border-bottom:1px solid rgba(27,28,28,.08)}
.wolai-search-input-icon{width:22px;height:22px;color:#8B8780;margin-right:10px}
.wolai-search-input{flex:1 1 auto;min-width:0;height:56px;border:0;outline:none;background:transparent;color:#24211D;font:400 18px/1.4 var(--wolai-font-sans);letter-spacing:0}
.wolai-search-input::placeholder{color:#A29E97}
2026-04-30 18:36:50 +08:00
.wolai-search-input::-webkit-search-cancel-button{appearance:none;-webkit-appearance:none;display:none}
.wolai-search-close{width:28px;height:28px;border:0;border-radius:4px;background:transparent;color:#8B8780;cursor:pointer;font-size:20px;line-height:1}
.wolai-search-options{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px 8px;border-bottom:1px solid rgba(27,28,28,.06);color:#A7A39D;font-size:12px;line-height:1}
2026-04-30 18:36:50 +08:00
.wolai-search-options[hidden]{display:none!important}
.wolai-search-options-left,.wolai-search-options-right,.wolai-search-switch-control,.wolai-search-sort-control{display:inline-flex;align-items:center}
.wolai-search-options-left{min-width:0;flex-wrap:wrap;gap:8px 12px}
.wolai-search-options-right{margin-left:auto;flex:0 0 auto}
.wolai-search-switch-control,.wolai-search-sort-control{gap:5px;white-space:nowrap}
.wolai-search-switch,.wolai-search-sort-value{border:0;background:transparent;cursor:pointer;font:inherit;letter-spacing:0}
.wolai-search-switch{position:relative;width:28px;height:16px;border-radius:999px;background:#D6D4D0;box-shadow:inset 0 0 0 1px rgba(27,28,28,.04)}
.wolai-search-switch::after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:999px;background:#FFF;box-shadow:0 1px 2px rgba(15,23,42,.22)}
.wolai-search-switch.is-on{background:#C9C7C3}
.wolai-search-switch.is-on::after{transform:translateX(12px)}
.wolai-search-sort-value{display:inline-flex;align-items:center;gap:3px;color:#6D6A65}
.wolai-search-sort-value::after{content:"⌄";color:#B8B4AD;font-size:13px;line-height:1}
.wolai-search-result-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 16px;color:#8B8780;font-size:12px;line-height:1.3;border-bottom:1px solid rgba(27,28,28,.06)}
.wolai-search-results{overflow:auto;padding:6px}
.wolai-search-result-row{width:100%;min-height:54px;display:flex;align-items:flex-start;gap:10px;padding:9px 10px;border:0;border-radius:4px;background:transparent;color:#37352F;cursor:pointer;text-align:left;font:inherit}
.wolai-search-result-row:hover{background:rgba(55,53,47,.08)}
.wolai-search-result-icon{width:18px;height:18px;margin-top:2px;color:#8B8780}
.wolai-search-result-main{min-width:0;display:flex;flex-direction:column;gap:3px}
.wolai-search-result-title{color:#2F2D29;font-size:14px;line-height:1.35;word-break:break-word}
2026-04-30 18:36:50 +08:00
.wolai-search-result-title mark,.wolai-search-result-snippet mark{padding:0 1px;border-radius:2px;background:#FFE9E6;color:#D83A32}
.wolai-search-result-snippet,.wolai-search-empty{color:#8B8780;font-size:12px;line-height:1.35}
2026-04-30 18:36:50 +08:00
.wolai-search-empty,.wolai-search-recent{padding:28px 12px 32px;text-align:center;color:#8B8780;font-size:12px;line-height:1.35}
2026-04-29 12:24:44 +08:00
@media (max-width: 768px) {
.mnote-sidebar {
width: 200px;
}
.mnote-home {
padding: 48px 24px;
}
.mnote-home h1 {
font-size: 28px;
}
.document-shell-header {
padding: 24px 0 0;
max-width: 100%;
}
.document-shell-header h1 {
font-size: 28px;
2026-04-30 18:36:50 +08:00
line-height: 36px;
2026-04-29 12:24:44 +08:00
}
#mnote-editor-island {
margin: 0 24px;
width: auto;
padding-bottom: 24px;
}
#mnote-search-shell,
#mnote-mindmap-shell {
padding: 24px;
}
#mnote-search-shell h1,
#mnote-mindmap-shell h1 {
font-size: 24px;
}
}
@media (max-width: 480px) {
.mnote-sidebar {
width: 100%;
height: auto;
border-right: none;
border-bottom: 1px solid var(--wolai-border);
}
.mnote-shell {
flex-direction: column;
}
.mnote-home {
padding: 32px 16px;
}
.mnote-home h1 {
font-size: 24px;
}
.document-shell-header {
padding: 16px 0 0;
}
.document-shell-header h1 {
font-size: 24px;
}
#mnote-editor-island {
margin: 0 16px;
width: auto;
padding-bottom: 16px;
}
}
2026-04-29 16:23:49 +08:00
/* ===== Stitch 260429 UI parity overrides ===== */
:root {
--atelier-surface: #FAF9F9;
--atelier-sidebar: #F5F5F5;
2026-04-29 16:23:49 +08:00
--atelier-sidebar-hover: #ECEBE9;
--atelier-sidebar-active: #E3E2E2;
--atelier-document: #FFFFFF;
--atelier-text: #1B1C1C;
--atelier-text-muted: #8A8782;
--atelier-text-soft: #B7B4AF;
--atelier-outline: #EAEAEA;
--atelier-primary: #006E28;
--atelier-primary-container: #31AA4D;
--atelier-secondary: #2367F6;
--atelier-shadow: 0 16px 32px rgba(27, 28, 28, 0.04);
}
html,
body {
background: var(--atelier-document);
}
body {
color: var(--atelier-text);
font-family: Inter, var(--wolai-font-sans);
letter-spacing: 0;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.mnote-shell,
.wolai-workspace-shell {
background: var(--atelier-document);
}
.mnote-sidebar,
.wolai-sidebar {
width: 248px;
2026-04-29 16:23:49 +08:00
background: var(--atelier-sidebar);
border-right: 0;
box-shadow: none;
2026-04-29 16:23:49 +08:00
overflow-x: hidden;
}
.mnote-sidebar-header,
.wolai-sidebar-header {
height: 40px;
padding: 8px 12px;
gap: 8px;
2026-04-29 16:23:49 +08:00
}
.wolai-avatar {
width: 24px;
height: 24px;
2026-04-29 16:23:49 +08:00
border-radius: 5px;
background: #D6534D;
font-size: 14px;
2026-04-29 16:23:49 +08:00
font-weight: 650;
}
.wolai-sidebar-header .sidebar-workspace-name,
.sidebar-workspace-name {
max-width: 160px;
color: var(--atelier-text);
font-size: 16px;
2026-04-29 16:23:49 +08:00
font-weight: 700;
line-height: 24px;
2026-04-29 16:23:49 +08:00
}
.wolai-sidebar-chevron {
color: #55514C;
font-size: 17px;
}
.wolai-quick-actions {
2026-05-08 00:41:03 +08:00
grid-template-columns: repeat(7, minmax(0, 1fr));
gap: 10.4px;
padding: 5px 8px 11px;
2026-04-29 16:23:49 +08:00
}
.wolai-quick-actions a,
2026-05-08 00:41:03 +08:00
.wolai-quick-actions button,
2026-04-29 16:23:49 +08:00
.mnote-sidebar-nav a {
border-radius: 4px;
}
2026-05-08 00:41:03 +08:00
.wolai-quick-actions a,
.wolai-quick-actions button {
height: 30px;
2026-04-29 16:23:49 +08:00
color: #3F3D39;
font-size: 14px;
2026-04-29 16:23:49 +08:00
}
2026-05-08 00:41:03 +08:00
.wolai-quick-actions a:hover,
.wolai-quick-actions button:hover {
2026-04-29 16:23:49 +08:00
background: rgba(27, 28, 28, 0.07);
}
.wolai-sidebar-body {
padding-bottom: 0;
}
.wolai-sidebar-section {
padding: 0 8px 18px;
}
.wolai-section-title,
.wolai-sidebar-tabs {
height: 32px;
2026-04-29 16:23:49 +08:00
display: flex;
align-items: center;
gap: 6px;
padding: 0 8px;
color: var(--atelier-text-muted);
font-size: 16px;
line-height: 24px;
2026-04-29 16:23:49 +08:00
font-weight: 500;
}
.wolai-section-icon {
color: #FF9F1A;
}
.wolai-section-caret {
color: var(--atelier-text-soft);
font-size: 13px;
}
.wolai-sidebar-tabs {
gap: 16px;
margin-bottom: 6px;
}
.wolai-sidebar-tab {
display: inline-flex;
align-items: center;
gap: 5px;
min-height: 26px;
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
color: var(--atelier-text-muted);
font: inherit;
line-height: 1;
white-space: nowrap;
cursor: pointer;
}
.wolai-sidebar-tab:hover {
color: var(--atelier-text);
}
.wolai-sidebar-tab-active {
color: var(--atelier-text);
border-bottom: 2px solid var(--atelier-primary-container);
}
.wolai-sidebar-tab-muted {
color: #9B9892;
}
.wolai-sidebar-tab-panels {
min-height: 0;
}
.wolai-sidebar-tab-panel[hidden] {
display: none !important;
}
.wolai-folder-icon {
color: #A8A49E;
font-size: 15px;
}
.wolai-section-add {
margin-left: auto;
width: 22px;
height: 22px;
border-radius: 4px;
color: var(--atelier-text-soft);
font-size: 20px;
}
.wolai-section-add:hover {
background: var(--atelier-sidebar-hover);
color: var(--atelier-text);
}
.wolai-page-row {
min-height: 30px;
gap: 7px;
margin: 1px 4px;
padding: 0 8px 0 12px;
border-radius: 4px;
color: #2D2E2E;
font-size: 14px;
line-height: 1.2;
}
.wolai-page-row:hover {
background: var(--atelier-sidebar-hover);
}
.wolai-page-row[data-active="true"],
.wolai-active-row {
background: var(--atelier-sidebar-active);
color: var(--atelier-text);
}
.wolai-row-caret {
width: 12px;
flex: 0 0 12px;
color: #B8B5AF;
font-size: 16px;
}
.wolai-row-icon {
width: 20px;
color: #111111;
font-size: 16px;
}
.wolai-row-title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sidebar-tree-section {
border-top: 0;
margin-top: 0;
padding-top: 0;
}
.sidebar-tree {
padding: 0;
}
.sidebar-tree .tree-empty,
.wolai-sidebar-empty {
padding: 6px 12px;
color: var(--atelier-text-soft);
font-size: 13px;
}
.sidebar-tree .tree-row {
height: 32px;
gap: 0;
margin: 0 5px;
padding: 0;
2026-04-29 16:23:49 +08:00
border-radius: 4px;
color: #2D2E2E;
font-size: 16px;
line-height: 24px;
2026-04-29 16:23:49 +08:00
}
.sidebar-tree .tree-row:hover {
background: var(--atelier-sidebar-hover);
}
.sidebar-tree .tree-row[data-active="true"],
.sidebar-tree .tree-row[data-selected="true"] {
background: rgba(255, 71, 71, 0.1);
color: #E0525B;
2026-04-29 16:23:49 +08:00
}
.sidebar-tree .tree-row[data-drop-feedback="true"],
.sidebar-tree .tree-row[data-drop-target="true"],
.sidebar-tree .tree-root[data-drop-target="true"] {
background: rgba(0, 110, 40, 0.12);
box-shadow: inset 0 0 0 1px rgba(0, 110, 40, 0.28);
}
2026-04-29 16:23:49 +08:00
.sidebar-tree .tree-toggle,
.sidebar-tree .tree-spacer {
width: 20px;
height: 24px;
2026-04-29 16:23:49 +08:00
color: #B8B5AF;
font-size: 16px;
}
.sidebar-tree .tree-toggle {
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
line-height: 1;
2026-04-29 16:23:49 +08:00
}
.sidebar-tree .tree-toggle:hover {
background: rgba(27, 28, 28, 0.06);
}
.sidebar-tree .tree-toggle-icon {
width: 20px;
height: 20px;
display: block;
fill: #878787;
transform-origin: 50% 50%;
}
.sidebar-tree .tree-toggle[aria-expanded="true"] .tree-toggle-icon {
transform: rotate(90deg);
}
.sidebar-tree .tree-row[data-active="true"] .tree-toggle-icon {
fill: #CF5659;
}
.sidebar-tree:not([data-tree-shell-mode="filetree"]) .tree-kind-badge[data-kind="page"] {
display: none;
}
2026-04-29 16:23:49 +08:00
.sidebar-tree .tree-kind-badge {
width: 20px;
height: 20px;
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 20px;
color: #111111;
font-size: 15px;
2026-04-30 06:58:17 +08:00
overflow: hidden;
2026-04-29 16:23:49 +08:00
}
.sidebar-tree .tree-kind-badge::before {
content: "□";
2026-04-30 06:58:17 +08:00
font-family: var(--wolai-font-sans);
font-size: 18px;
line-height: 1;
2026-04-29 16:23:49 +08:00
}
.sidebar-tree .tree-kind-badge[data-kind="page"]::before {
content: "";
2026-04-29 16:23:49 +08:00
}
.sidebar-tree[data-tree-shell-mode="filetree"] .tree-kind-badge[data-kind="page"]::before,
.sidebar-tree .tree-kind-badge[data-kind="document"]::before {
content: "◇";
}
.sidebar-tree .tree-kind-badge[data-kind="index"]::before {
content: "▤";
color: var(--atelier-secondary);
}
2026-04-30 06:58:17 +08:00
.sidebar-tree .tree-kind-badge[data-kind="folder"]::before,
.sidebar-tree .tree-kind-badge[data-kind="asset_folder"]::before {
2026-04-29 16:23:49 +08:00
content: "▱";
color: #D08A1F;
}
2026-04-30 06:58:17 +08:00
.sidebar-tree .tree-kind-badge[data-kind="image"]::before {
content: "▧";
color: #5B7CFA;
}
.sidebar-tree .tree-kind-badge[data-kind="mindmap"]::before {
content: "⌘";
color: #31AA4D;
}
.sidebar-tree .tree-kind-badge[data-kind="table"]::before,
.sidebar-tree .tree-kind-badge[data-kind="luckysheet"]::before {
content: "▦";
color: #2367F6;
}
2026-04-29 16:23:49 +08:00
.sidebar-tree .tree-link {
padding: 0 2px;
color: inherit;
font-size: 16px;
2026-04-29 16:23:49 +08:00
}
.sidebar-tree .tree-link-title {
font-weight: 400;
}
.sidebar-tree .tree-row[data-active="true"] .tree-link-title {
font-weight: 400;
2026-04-29 16:23:49 +08:00
}
.sidebar-tree .tree-actions {
gap: 1px;
margin-left: auto;
2026-04-29 16:23:49 +08:00
}
.sidebar-tree .tree-action {
width: 24px;
height: 24px;
color: #B3B3B3;
2026-04-29 16:23:49 +08:00
border-radius: 4px;
}
.sidebar-tree .tree-action:hover {
background: rgba(27, 28, 28, 0.07);
color: var(--atelier-text);
}
2026-04-30 06:58:17 +08:00
.mnote-tree-context-menu {
position: fixed;
z-index: 1000;
width: 220px;
min-width: 220px;
2026-04-30 06:58:17 +08:00
max-width: min(320px, calc(100vw - 16px));
padding: 6px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 6px;
background: #FFFFFF;
box-shadow: 0 8px 20px rgba(27, 28, 28, 0.12);
2026-04-30 06:58:17 +08:00
backdrop-filter: blur(24px);
color: var(--atelier-text);
}
.mnote-tree-context-menu__item {
width: 100%;
height: 30px;
min-height: 30px;
2026-04-30 06:58:17 +08:00
display: flex;
align-items: center;
gap: 8px;
padding: 4px 8px;
2026-04-30 06:58:17 +08:00
border: 0;
border-radius: 5px;
background: transparent;
color: inherit;
font: inherit;
font-size: 14px;
line-height: 22px;
2026-04-30 06:58:17 +08:00
text-align: left;
cursor: pointer;
}
.mnote-tree-context-menu__item:hover {
background: #F4F3F3;
}
.mnote-tree-context-menu__item:disabled {
opacity: 0.45;
cursor: default;
}
.mnote-tree-context-menu__item--danger {
color: #D64545;
}
.mnote-tree-context-menu__item--danger:hover {
background: rgba(214, 69, 69, 0.08);
}
.mnote-tree-context-menu__icon {
width: 18px;
flex: 0 0 18px;
color: #6D6A65;
font-size: 18px;
}
.mnote-tree-context-menu__icon::before {
font-size: 18px;
}
.mnote-tree-context-menu__item--danger .mnote-tree-context-menu__icon {
color: currentColor;
}
.mnote-tree-context-menu__label {
min-width: 0;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mnote-tree-context-menu__shortcut {
color: #A19D97;
font-size: 12px;
}
.mnote-tree-context-menu__separator {
height: 1px;
margin: 6px 0;
2026-04-30 06:58:17 +08:00
background: rgba(27, 28, 28, 0.08);
}
.mnote-attachment-actions {
position: fixed;
z-index: 1100;
display: inline-flex;
align-items: center;
gap: 2px;
height: 28px;
padding: 2px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 6px;
background: #FFFFFF;
box-shadow: 0 6px 18px rgba(27, 28, 28, 0.12);
}
.mnote-attachment-actions[hidden] {
display: none !important;
}
.mnote-attachment-action {
width: 24px;
height: 24px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 0;
border-radius: 4px;
background: transparent;
color: #6D6A65;
cursor: pointer;
}
.mnote-attachment-action:hover {
background: #F4F3F3;
color: #37352F;
}
.mnote-attachment-action .material-symbols-outlined {
font-size: 18px;
}
.document-shell .editor-surface .ProseMirror a.mnote-uploaded-attachment-row {
display: inline-flex !important;
align-items: center !important;
gap: 7px !important;
max-width: 100% !important;
min-height: 28px !important;
padding: 2px 4px !important;
border-radius: 4px !important;
color: #37352f !important;
font-weight: 500 !important;
line-height: 1.4 !important;
text-decoration: none !important;
}
.document-shell .editor-surface .ProseMirror a.mnote-uploaded-attachment-row::after {
content: "" !important;
display: none !important;
}
.document-shell .editor-surface .ProseMirror a.mnote-uploaded-attachment-row[data-file-size]::after {
content: "◔ " attr(data-file-size) !important;
display: inline-block !important;
margin-left: 4px !important;
color: #9ca3af !important;
font-size: 12px !important;
line-height: 1 !important;
white-space: nowrap !important;
}
2026-04-29 16:23:49 +08:00
.sidebar-tree .tree-node .tree-children .tree-row {
padding-left: 20px;
}
.sidebar-tree .tree-node .tree-children .tree-children .tree-row {
padding-left: 32px;
}
.sidebar-tree .tree-node .tree-children .tree-children .tree-children .tree-row {
padding-left: 44px;
}
.sidebar-tree .tree-node .tree-children .tree-children .tree-children .tree-children .tree-row {
padding-left: 56px;
}
.wolai-file-tree-section {
padding-top: 2px;
}
.wolai-explorer-title {
margin-bottom: 4px;
}
.wolai-sidebar-footer {
border-top: 0;
2026-04-29 16:23:49 +08:00
background: var(--atelier-sidebar);
}
.wolai-footer-entry {
height: 44px;
gap: 8px;
color: #55514C;
font-size: 14px;
}
.wolai-footer-entry + .wolai-footer-entry {
border-left: 1px solid rgba(27, 28, 28, 0.08);
}
.mnote-main,
.mnote-content {
background: var(--atelier-document);
}
.wolai-topbar {
2026-04-30 18:36:50 +08:00
height: 40px;
2026-04-29 16:23:49 +08:00
padding: 0 20px 0 22px;
background: rgba(255, 255, 255, 0.92);
color: #5A5A5A;
font-size: 14px;
line-height: 1;
backdrop-filter: blur(16px);
}
.wolai-topbar-left,
.wolai-topbar-actions {
gap: 10px;
}
.wolai-breadcrumb {
display: flex;
align-items: center;
gap: 9px;
min-width: 0;
color: #6D6A65;
}
.wolai-breadcrumb-root {
white-space: nowrap;
}
.wolai-breadcrumb-separator {
color: #D0CDC8;
}
.wolai-breadcrumb-current {
display: inline-flex;
align-items: center;
gap: 5px;
min-width: 0;
color: var(--atelier-text);
font-weight: 500;
}
.wolai-home-icon {
color: #111111;
font-size: 16px;
}
.wolai-icon-button {
width: 28px;
height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 0;
border-radius: 4px;
background: transparent;
color: #5A5A5A;
font: inherit;
font-size: 18px;
line-height: 1;
cursor: pointer;
}
.wolai-icon-button:hover {
background: #F4F3F3;
color: var(--atelier-text);
}
.wolai-menu-button {
color: #3D3B37;
font-size: 21px;
}
.wolai-public-pill {
2026-04-30 18:36:50 +08:00
height: 22px;
2026-04-29 16:23:49 +08:00
display: inline-flex;
align-items: center;
gap: 5px;
2026-04-30 18:36:50 +08:00
padding: 0 8px;
border: 0;
border-radius: 3px;
2026-04-29 16:23:49 +08:00
background: #ECFCEF;
color: #087B31;
font-size: 12px;
2026-04-30 18:36:50 +08:00
font-weight: 500;
2026-04-29 16:23:49 +08:00
}
.wolai-ai-inline {
color: var(--atelier-primary-container);
}
.document-shell {
2026-04-30 18:36:50 +08:00
box-sizing: border-box;
width: min(100%, 760px);
min-height: calc(100vh - 40px);
padding: 68px 0 160px;
2026-04-29 16:23:49 +08:00
margin: 0 auto;
}
.document-workspace {
--mnote-secondary-pane-width: minmax(320px, 42%);
--mnote-secondary-pane-resizer-width: 6px;
display: grid;
grid-template-columns: minmax(0, 1fr);
align-items: start;
width: 100%;
min-width: 0;
}
.document-workspace[data-has-secondary-pane="true"] {
grid-template-columns: minmax(0, 1fr) var(--mnote-secondary-pane-resizer-width) var(--mnote-secondary-pane-width);
}
.document-pane {
min-width: 0;
}
.document-pane[hidden] {
display: none !important;
}
.document-pane-resizer {
display: none;
width: var(--mnote-secondary-pane-resizer-width);
min-height: calc(100vh - 40px);
cursor: col-resize;
position: relative;
}
.document-workspace[data-has-secondary-pane="true"] .document-pane-resizer {
display: block;
}
.document-pane-resizer::after {
content: "";
position: absolute;
left: 2px;
top: 64px;
bottom: 48px;
width: 2px;
border-radius: 999px;
background: rgba(27, 28, 28, 0.08);
}
2026-04-29 16:23:49 +08:00
.document-shell-header {
max-width: none;
padding: 0;
2026-04-30 18:36:50 +08:00
margin: 0 0 50px;
2026-04-29 16:23:49 +08:00
}
.document-pane-header-row {
display: flex;
align-items: flex-start;
gap: 12px;
}
.document-pane-header-row .document-title-heading {
flex: 1;
min-width: 0;
}
2026-04-29 16:23:49 +08:00
.document-page-icon {
2026-04-30 18:36:50 +08:00
display: none;
2026-04-29 16:23:49 +08:00
}
2026-04-30 06:58:17 +08:00
.mnote-material-page-icon {
width: 72px;
height: 72px;
font-size: 72px;
}
.mnote-material-page-icon::before {
font-size: 72px;
}
.document-title-heading,
2026-04-29 16:23:49 +08:00
.document-shell-header h1 {
padding: 0;
2026-04-30 18:36:50 +08:00
margin: 0;
2026-04-29 16:23:49 +08:00
color: var(--atelier-text);
2026-04-30 18:36:50 +08:00
font-size: 34px;
font-weight: 600;
line-height: 44px;
2026-04-29 16:23:49 +08:00
letter-spacing: 0;
text-align: left;
}
.document-title-input {
width: 100%;
2026-04-30 18:36:50 +08:00
min-height: 44px;
display: block;
resize: none;
overflow: hidden;
border: 0;
outline: none;
background: transparent;
color: inherit;
font: inherit;
line-height: inherit;
letter-spacing: 0;
text-align: inherit;
}
.document-title-input::placeholder {
color: #B8B5AF;
}
.document-title-input[data-title-save-status="error"] {
text-decoration: underline;
text-decoration-color: #D6545D;
text-underline-offset: 6px;
}
.document-pane-close {
width: 28px;
height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
margin-top: 8px;
border: 0;
border-radius: 4px;
background: transparent;
color: #6D6A65;
cursor: pointer;
flex: 0 0 auto;
}
.document-pane-close:hover {
background: #F4F3F3;
color: #1B1C1C;
}
2026-04-29 16:23:49 +08:00
.document-shell-meta {
2026-04-30 18:36:50 +08:00
display: none;
2026-04-29 16:23:49 +08:00
}
.document-shell-meta span {
display: inline-flex;
align-items: center;
gap: 6px;
}
#mnote-editor-island {
width: 100%;
max-width: none;
min-height: 360px;
margin: 0;
padding: 0 0 48px;
}
#mnote-leptos-tiptap-island-editor-root {
min-height: 320px;
}
#mnote-leptos-tiptap-island-editor-root .editor-surface {
border: 0 !important;
box-shadow: none !important;
background: transparent !important;
padding: 0 !important;
}
#mnote-leptos-tiptap-island-editor-root .ProseMirror,
.ProseMirror {
color: var(--atelier-text);
font-size: 16px;
2026-04-30 18:36:50 +08:00
line-height: 24px;
2026-04-29 16:23:49 +08:00
outline: none;
}
#mnote-leptos-tiptap-island-editor-root .ProseMirror {
width: 100% !important;
min-height: 280px;
margin: 0 !important;
padding: 0 !important;
}
#mnote-leptos-tiptap-island-editor-root .block-handle-shell {
2026-04-30 21:50:40 +08:00
left: -32px !important;
z-index: 80;
opacity: 1;
pointer-events: none;
transition: opacity 120ms ease, transform 120ms ease;
}
#mnote-leptos-tiptap-island-editor-root .block-handle-shell:hover,
#mnote-leptos-tiptap-island-editor-root .block-handle-shell[data-dragging="true"] {
2026-04-30 21:50:40 +08:00
opacity: 1;
}
#mnote-leptos-tiptap-island-editor-root .block-handle-shell .block-handle-insert,
#mnote-leptos-tiptap-island-editor-root .block-handle-shell .block-handle-trigger {
pointer-events: auto;
}
2026-04-29 16:23:49 +08:00
#mnote-leptos-tiptap-island-editor-root .ProseMirror p {
2026-04-30 18:36:50 +08:00
margin: 0 0 8px;
}
#mnote-leptos-tiptap-island-editor-root .ProseMirror ul,
#mnote-leptos-tiptap-island-editor-root .ProseMirror ol {
margin: 4px 0 8px;
padding-left: 1.5em;
}
#mnote-leptos-tiptap-island-editor-root .ProseMirror li {
margin: 2px 0;
padding-left: 2px;
}
#mnote-leptos-tiptap-island-editor-root .ProseMirror blockquote {
margin: 8px 0;
padding: 2px 0 2px 14px;
border-left: 3px solid #D9D6D0;
color: #5F5B56;
}
#mnote-leptos-tiptap-island-editor-root .ProseMirror input[type="checkbox"] {
width: 16px;
height: 16px;
margin: 0 8px 0 0;
vertical-align: -3px;
accent-color: #2EA44F;
2026-04-29 16:23:49 +08:00
}
#mnote-leptos-tiptap-island-editor-root .ProseMirror h1,
#mnote-leptos-tiptap-island-editor-root .ProseMirror h2,
#mnote-leptos-tiptap-island-editor-root .ProseMirror h3 {
line-height: 1.2;
letter-spacing: 0;
}
.mnote-workspace-active-state {
padding-top: 10px;
}
.mnote-workspace-active-link {
display: inline-flex;
align-items: center;
gap: 8px;
min-height: 30px;
color: var(--atelier-text);
font-size: 15px;
text-decoration: underline;
text-decoration-color: #D7D4CE;
text-underline-offset: 5px;
}
.mnote-workspace-active-link::before {
content: "▤";
color: #A19D97;
text-decoration: none;
}
.wolai-floating-actions {
right: 24px;
2026-04-30 18:36:50 +08:00
bottom: 44px;
flex-direction: column-reverse;
gap: 16px;
2026-04-29 16:23:49 +08:00
z-index: 50;
}
.wolai-floating-button {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 999px;
cursor: pointer;
}
.wolai-floating-button--help {
width: 40px;
height: 40px;
border: 1px solid rgba(27, 28, 28, 0.1);
background: rgba(255, 255, 255, 0.86);
color: #5A5A5A;
box-shadow: 0 10px 24px rgba(27, 28, 28, 0.08);
backdrop-filter: blur(16px);
font-size: 18px;
}
.wolai-floating-button--ai {
2026-04-30 18:36:50 +08:00
width: 40px;
height: 40px;
border: 1px solid rgba(27, 28, 28, 0.1);
background: #FFFFFF;
color: #5A5A5A;
box-shadow: 0 10px 24px rgba(27, 28, 28, 0.08);
font-size: 18px;
2026-04-29 16:23:49 +08:00
}
2026-05-06 21:44:20 +08:00
.document-shell[data-page-wide-layout="true"] {
width: min(100%, 980px);
}
.document-pane[data-pane-role="secondary"] .document-shell {
width: min(100%, 820px);
padding-left: 28px;
padding-right: 20px;
}
.document-pane[data-pane-role="secondary"] .document-shell-header {
margin-bottom: 36px;
}
2026-05-06 21:44:20 +08:00
.document-shell[data-page-small-text="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror,
.document-shell[data-page-small-text="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror p,
.document-shell[data-page-small-text="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror li {
font-size: 15px;
line-height: 22px;
}
.document-shell[data-layout-density="compact"] #mnote-leptos-tiptap-island-editor-root .ProseMirror p,
.document-shell[data-layout-density="compact"] #mnote-leptos-tiptap-island-editor-root .ProseMirror ul,
.document-shell[data-layout-density="compact"] #mnote-leptos-tiptap-island-editor-root .ProseMirror ol,
.document-shell[data-layout-density="compact"] #mnote-leptos-tiptap-island-editor-root .ProseMirror blockquote {
margin-bottom: 4px;
}
.document-shell[data-layout-density="spacious"] #mnote-leptos-tiptap-island-editor-root .ProseMirror p,
.document-shell[data-layout-density="spacious"] #mnote-leptos-tiptap-island-editor-root .ProseMirror ul,
.document-shell[data-layout-density="spacious"] #mnote-leptos-tiptap-island-editor-root .ProseMirror ol,
.document-shell[data-layout-density="spacious"] #mnote-leptos-tiptap-island-editor-root .ProseMirror blockquote {
margin-bottom: 14px;
}
.document-shell[data-page-font="song"] .document-title-input,
.document-shell[data-page-font="song"] #mnote-leptos-tiptap-island-editor-root .ProseMirror {
font-family: "Noto Serif SC", "Songti SC", serif;
}
.document-shell[data-page-font="kai"] .document-title-input,
.document-shell[data-page-font="kai"] #mnote-leptos-tiptap-island-editor-root .ProseMirror {
font-family: "STKaiti", "KaiTi", serif;
}
.document-shell[data-page-show-heading-numbers="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror {
counter-reset: mnote-heading;
}
.document-shell[data-page-show-heading-numbers="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror h1::before,
.document-shell[data-page-show-heading-numbers="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror h2::before,
.document-shell[data-page-show-heading-numbers="true"] #mnote-leptos-tiptap-island-editor-root .ProseMirror h3::before {
counter-increment: mnote-heading;
content: counter(mnote-heading) ". ";
color: #8B8782;
font-weight: 500;
}
.wolai-page-settings-popover {
position: fixed;
top: 52px;
right: 18px;
z-index: 90;
}
.wolai-page-settings-panel {
width: min(360px, calc(100vw - 24px));
display: flex;
flex-direction: column;
gap: 12px;
padding: 14px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 14px;
background: rgba(255, 255, 255, 0.98);
box-shadow: 0 18px 48px rgba(27, 28, 28, 0.12);
}
.wolai-page-settings-tabs {
display: flex;
gap: 6px;
}
.wolai-page-settings-tab {
height: 30px;
padding: 0 10px;
border: 0;
border-radius: 8px;
background: transparent;
color: #6D6A65;
font-size: 13px;
cursor: pointer;
}
.wolai-page-settings-tab.is-active {
background: #F4F3F3;
color: #1B1C1C;
font-weight: 600;
}
.wolai-page-settings-section {
display: flex;
flex-direction: column;
gap: 8px;
}
.wolai-page-settings-section[hidden] {
display: none !important;
}
.wolai-page-setting-row {
min-height: 48px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 8px 0;
}
.wolai-page-setting-row.is-pending {
opacity: 0.72;
}
.wolai-page-setting-copy {
display: flex;
min-width: 0;
flex-direction: column;
gap: 3px;
}
.wolai-page-setting-label {
color: #1B1C1C;
font-size: 14px;
line-height: 20px;
}
.wolai-page-setting-hint,
.wolai-page-settings-global-note {
color: #8B8782;
font-size: 12px;
line-height: 18px;
}
.wolai-page-setting-checkbox {
width: 16px;
height: 16px;
flex: 0 0 auto;
}
.wolai-page-setting-select {
min-width: 96px;
height: 30px;
padding: 0 10px;
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 8px;
background: #FFF;
color: #1B1C1C;
font-size: 13px;
}
.wolai-page-settings-actions {
display: flex;
flex-direction: column;
gap: 6px;
padding-top: 4px;
border-top: 1px solid rgba(27, 28, 28, 0.06);
}
.wolai-page-settings-action {
min-height: 34px;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 10px;
border: 0;
border-radius: 8px;
background: transparent;
color: #1B1C1C;
font-size: 13px;
cursor: pointer;
}
.wolai-page-settings-action:hover {
background: #F4F3F3;
}
.wolai-page-settings-action.is-disabled {
color: #A19D97;
cursor: not-allowed;
}
.wolai-page-settings-action.is-danger {
color: #C44B55;
}
.wolai-page-settings-stats {
display: flex;
flex-wrap: wrap;
gap: 8px 12px;
padding-top: 4px;
color: #8B8782;
font-size: 12px;
line-height: 18px;
}
.wolai-page-history-drawer {
position: fixed;
inset: 0;
z-index: 88;
background: rgba(27, 28, 28, 0.04);
}
.wolai-page-history-drawer[hidden] {
display: none !important;
}
.wolai-page-history-panel {
position: absolute;
top: 16px;
right: 16px;
bottom: 16px;
width: min(380px, calc(100vw - 24px));
display: flex;
flex-direction: column;
gap: 14px;
padding: 16px;
border-left: 1px solid rgba(27, 28, 28, 0.08);
background: #FFF;
box-shadow: -18px 0 42px rgba(27, 28, 28, 0.12);
}
.wolai-page-history-header,
.wolai-page-share-header,
.wolai-page-ai-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
.wolai-page-history-title,
.wolai-page-share-title,
.wolai-page-ai-title {
color: #1B1C1C;
font-size: 16px;
font-weight: 600;
line-height: 24px;
}
.wolai-page-history-subtitle,
.wolai-page-share-subtitle,
.wolai-page-ai-subtitle {
color: #8B8782;
font-size: 12px;
line-height: 18px;
}
.wolai-surface-close {
width: 28px;
height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 0;
border-radius: 8px;
background: transparent;
color: #5A5A5A;
cursor: pointer;
}
.wolai-surface-close:hover {
background: #F4F3F3;
}
.wolai-page-history-list {
display: flex;
flex: 1 1 auto;
flex-direction: column;
gap: 10px;
overflow: auto;
}
.wolai-page-history-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 10px;
background: #FFF;
}
.wolai-page-history-item-title {
color: #1B1C1C;
font-size: 13px;
font-weight: 500;
line-height: 20px;
}
.wolai-page-history-item-meta,
.wolai-page-history-empty,
.wolai-page-share-copy,
.wolai-page-share-footer,
.wolai-page-ai-empty,
.wolai-page-ai-message-role {
color: #8B8782;
font-size: 12px;
line-height: 18px;
}
.wolai-page-history-item-ghost,
.wolai-page-ai-ghost,
.wolai-page-ai-tab,
.wolai-page-ai-model-chip,
.wolai-page-share-copy-button {
height: 30px;
padding: 0 10px;
border: 0;
border-radius: 8px;
background: #F4F3F3;
color: #1B1C1C;
font-size: 12px;
cursor: pointer;
}
.wolai-page-share-dialog {
position: fixed;
inset: 0;
z-index: 92;
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
background: rgba(27, 28, 28, 0.12);
}
.wolai-page-share-dialog[hidden] {
display: none !important;
}
.wolai-page-share-card {
width: min(460px, calc(100vw - 24px));
display: flex;
flex-direction: column;
gap: 16px;
padding: 18px;
border-radius: 16px;
background: #FFF;
box-shadow: 0 18px 48px rgba(27, 28, 28, 0.18);
}
.wolai-page-share-state {
display: flex;
flex-direction: column;
gap: 8px;
}
.wolai-public-pill--inline {
width: fit-content;
}
.wolai-page-share-url-row {
display: flex;
gap: 8px;
}
.wolai-page-share-url {
flex: 1 1 auto;
height: 34px;
padding: 0 10px;
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 8px;
background: #FFF;
color: #1B1C1C;
font-size: 13px;
}
.wolai-page-ai-drawer {
position: fixed;
top: 12px;
right: 12px;
bottom: 12px;
z-index: 89;
}
.wolai-page-ai-drawer[hidden] {
display: none !important;
}
.wolai-page-ai-panel {
width: min(440px, calc(100vw - 24px));
height: 100%;
display: flex;
flex-direction: column;
gap: 14px;
padding: 16px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 18px;
background: rgba(255, 255, 255, 0.98);
box-shadow: -18px 0 42px rgba(27, 28, 28, 0.14);
}
.wolai-page-ai-header-copy {
display: flex;
flex-direction: column;
gap: 4px;
}
.wolai-page-ai-body {
display: flex;
min-height: 0;
flex: 1 1 auto;
flex-direction: column;
gap: 16px;
}
.wolai-page-ai-suggestions {
display: flex;
flex-direction: column;
gap: 10px;
}
.wolai-page-ai-suggestions-header,
.wolai-page-ai-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
2026-05-14 15:10:33 +08:00
.wolai-page-ai-intents {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 6px;
}
2026-05-06 21:44:20 +08:00
.wolai-page-ai-suggestion-list,
.wolai-page-ai-toolbar {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
2026-05-08 00:41:03 +08:00
.wolai-page-ai-provider-group {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
2026-05-06 21:44:20 +08:00
.wolai-page-ai-suggestion {
min-height: 32px;
padding: 8px 10px;
border: 1px solid rgba(27, 28, 28, 0.08);
border-radius: 10px;
background: #FFF;
color: #1B1C1C;
font-size: 12px;
text-align: left;
cursor: pointer;
}
.wolai-page-ai-conversation {
display: flex;
min-height: 0;
flex: 1 1 auto;
flex-direction: column;
gap: 10px;
overflow: auto;
}
.wolai-page-ai-message {
display: flex;
flex-direction: column;
gap: 4px;
padding: 10px 12px;
border-radius: 12px;
background: #F7F7F7;
}
2026-05-08 00:41:03 +08:00
.wolai-page-ai-message--history {
width: 100%;
border: 1px solid rgba(27, 28, 28, 0.08);
text-align: left;
cursor: pointer;
}
.wolai-page-ai-message--history.is-active {
border-color: rgba(27, 28, 28, 0.28);
background: #F4F8FF;
}
2026-05-06 21:44:20 +08:00
.wolai-page-ai-message--user {
background: #F4F8FF;
}
.wolai-page-ai-message-text {
color: #1B1C1C;
font-size: 13px;
line-height: 20px;
white-space: pre-wrap;
}
.wolai-page-ai-footer {
display: flex;
flex-direction: column;
gap: 10px;
}
.wolai-page-ai-tab.is-active {
background: #1B1C1C;
color: #FFF;
}
2026-05-08 00:41:03 +08:00
.wolai-page-ai-model-chip.is-active {
background: #1B1C1C;
color: #FFF;
}
2026-05-06 21:44:20 +08:00
.wolai-page-ai-input-row {
display: flex;
gap: 8px;
align-items: flex-end;
}
.wolai-page-ai-input {
flex: 1 1 auto;
min-height: 88px;
padding: 10px 12px;
border: 1px solid rgba(27, 28, 28, 0.1);
border-radius: 12px;
background: #FFF;
color: #1B1C1C;
font-size: 13px;
line-height: 20px;
resize: none;
}
.wolai-page-ai-send {
width: 36px;
height: 36px;
border: 0;
border-radius: 10px;
background: #1B1C1C;
color: #FFF;
font-size: 16px;
cursor: pointer;
}
2026-04-29 16:23:49 +08:00
@media (max-width: 768px) {
.mnote-sidebar,
.wolai-sidebar {
width: 220px;
}
.wolai-topbar {
padding: 0 12px;
}
2026-05-06 21:44:20 +08:00
.wolai-page-settings-popover {
right: 12px;
}
.wolai-page-history-panel,
.wolai-page-ai-panel {
width: min(100vw - 24px, 420px);
}
2026-04-29 16:23:49 +08:00
.wolai-public-pill,
.wolai-breadcrumb-root,
.wolai-breadcrumb-separator {
display: none;
}
.document-workspace[data-has-secondary-pane="true"] {
grid-template-columns: minmax(0, 1fr);
}
.document-workspace[data-has-secondary-pane="true"] .document-pane-resizer {
display: none;
}
.document-pane[data-pane-role="secondary"] .document-shell {
padding-top: 32px;
padding-left: 0;
padding-right: 0;
}
2026-04-29 16:23:49 +08:00
.document-shell {
2026-04-30 18:36:50 +08:00
width: 100%;
2026-04-29 16:23:49 +08:00
padding: 48px 28px 120px;
}
.document-shell-header h1 {
font-size: 32px;
2026-04-30 18:36:50 +08:00
line-height: 40px;
2026-04-29 16:23:49 +08:00
}
#mnote-leptos-tiptap-island-editor-root .block-handle-shell {
2026-04-30 21:50:40 +08:00
left: -32px !important;
}
2026-04-29 16:23:49 +08:00
}
@media (max-width: 480px) {
.mnote-shell {
flex-direction: column;
}
.mnote-sidebar,
.wolai-sidebar {
width: 100%;
max-height: 42vh;
border-bottom: 1px solid rgba(27, 28, 28, 0.08);
box-shadow: none;
}
.document-shell {
padding: 36px 20px 112px;
}
.document-shell-header h1 {
font-size: 28px;
}
.wolai-topbar-actions {
gap: 2px;
}
2026-05-06 21:44:20 +08:00
.wolai-page-settings-panel,
.wolai-page-share-card,
.wolai-page-ai-panel {
width: calc(100vw - 24px);
}
2026-04-29 16:23:49 +08:00
}
2026-04-29 12:24:44 +08:00
"##;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn mnote_css_contains_core_selectors() {
// Wolai 设计系统 CSS 变量
assert!(MNOTE_CSS.contains("--wolai-text-primary"));
assert!(MNOTE_CSS.contains("--wolai-text-secondary"));
assert!(MNOTE_CSS.contains("--wolai-border"));
assert!(MNOTE_CSS.contains("--wolai-bg-sidebar"));
assert!(MNOTE_CSS.contains("--wolai-accent"));
// 布局结构
assert!(MNOTE_CSS.contains(".mnote-shell"));
assert!(MNOTE_CSS.contains(".mnote-sidebar"));
assert!(MNOTE_CSS.contains(".mnote-main"));
assert!(MNOTE_CSS.contains(".mnote-content"));
}
#[test]
fn mnote_css_contains_shell_ids() {
assert!(MNOTE_CSS.contains(".document-shell"));
assert!(MNOTE_CSS.contains("#mnote-search-shell"));
assert!(MNOTE_CSS.contains("#mnote-mindmap-shell"));
assert!(MNOTE_CSS.contains("#mnote-editor-island"));
assert!(MNOTE_CSS.contains("#mnote-search-island"));
assert!(MNOTE_CSS.contains("#mnote-mindmap-island"));
}
#[test]
fn mnote_css_contains_responsive_breakpoints() {
assert!(MNOTE_CSS.contains("@media (max-width: 768px)"));
assert!(MNOTE_CSS.contains("@media (max-width: 480px)"));
}
#[test]
fn mnote_css_contains_scrollbar_styles() {
assert!(MNOTE_CSS.contains("::-webkit-scrollbar"));
assert!(MNOTE_CSS.contains("::-webkit-scrollbar-thumb"));
}
#[test]
fn mnote_css_contains_prosemirror_styles() {
assert!(MNOTE_CSS.contains(".ProseMirror"));
}
#[test]
fn mnote_css_keeps_tiptap_handles_in_margin_and_title_editable() {
assert!(MNOTE_CSS.contains(".document-title-input"));
assert!(MNOTE_CSS.contains(".block-handle-shell"));
2026-04-30 21:50:40 +08:00
assert!(MNOTE_CSS.contains("left: -32px !important"));
assert!(MNOTE_CSS.contains("pointer-events: none"));
2026-04-30 06:58:17 +08:00
assert!(MNOTE_CSS.contains(".material-symbols-outlined"));
assert!(MNOTE_CSS.contains(".mnote-tree-context-menu"));
}
2026-04-29 12:24:44 +08:00
#[test]
fn mnote_css_is_reasonably_sized() {
// 至少 2000 字符才能包含完整样式
assert!(MNOTE_CSS.len() > 2000);
// 当前整合了工作区壳、编辑器样式、树菜单和双 pane 布局,仍保持在单文件可审阅范围内。
assert!(MNOTE_CSS.len() < 70000);
2026-04-29 12:24:44 +08:00
}
}