feat: txt/tsx/css等全部文本开编辑模式 + 代码语法着色(highlight.js GitHub Dark配色)
This commit is contained in:
@@ -93,6 +93,20 @@ export const css = [
|
||||
'.dsh-wt_mdSave:disabled{opacity:.6;cursor:default}',
|
||||
'.dsh-wt_mdMsg{font-size:11px;color:var(--dsw-alias-state-danger,#e5484d)}',
|
||||
'.dsh-wt_mdEdit{flex:1;min-height:0;width:100%;box-sizing:border-box;padding:12px 14px;background:var(--dsw-alias-bg-base,#0b0e14);color:var(--dsw-alias-label-primary,#e6e8eb);border:none;outline:none;resize:none;font-family:var(--dsw-font-mono,Consolas,Menlo,monospace);font-size:12px;line-height:1.7}',
|
||||
// 代码语法着色(GitHub Dark 风格 token 配色)
|
||||
'.dsh-wt_code{margin:0;font-family:var(--dsw-font-mono,Consolas,Menlo,monospace);font-size:12px;line-height:1.65;white-space:pre;word-break:normal}',
|
||||
'.dsh-wt_code .hljs-keyword,.dsh-wt_code .hljs-selector-tag,.dsh-wt_code .hljs-literal,.dsh-wt_code .hljs-doctag{color:#ff7b72}',
|
||||
'.dsh-wt_code .hljs-string,.dsh-wt_code .hljs-attr,.dsh-wt_code .hljs-regexp{color:#a5d6ff}',
|
||||
'.dsh-wt_code .hljs-comment,.dsh-wt_code .hljs-quote{color:#8b949e;font-style:italic}',
|
||||
'.dsh-wt_code .hljs-number,.dsh-wt_code .hljs-symbol,.dsh-wt_code .hljs-bullet{color:#79c0ff}',
|
||||
'.dsh-wt_code .hljs-title,.dsh-wt_code .hljs-function .hljs-title,.dsh-wt_code .hljs-section{color:#d2a8ff}',
|
||||
'.dsh-wt_code .hljs-built_in,.dsh-wt_code .hljs-type,.dsh-wt_code .hljs-class .hljs-title{color:#ffa657}',
|
||||
'.dsh-wt_code .hljs-variable,.dsh-wt_code .hljs-params,.dsh-wt_code .hljs-meta{color:#e6edf3}',
|
||||
'.dsh-wt_code .hljs-property,.dsh-wt_code .hljs-attribute{color:#79c0ff}',
|
||||
'.dsh-wt_code .hljs-tag,.dsh-wt_code .hljs-name{color:#7ee787}',
|
||||
'.dsh-wt_code .hljs-selector-class,.dsh-wt_code .hljs-selector-id{color:#d2a8ff}',
|
||||
'.dsh-wt_code .hljs-addition{color:#7ee787}',
|
||||
'.dsh-wt_code .hljs-deletion{color:#ff7b72}',
|
||||
'.dsh-wt_md h1,.dsh-wt_md h2,.dsh-wt_md h3,.dsh-wt_md h4{margin:14px 0 8px;line-height:1.3;font-weight:600;color:var(--dsw-alias-label-primary,#e6e8eb)}',
|
||||
'.dsh-wt_md h1{font-size:20px;border-bottom:1px solid var(--dsw-alias-border-l1,#262b36);padding-bottom:6px}',
|
||||
'.dsh-wt_md h2{font-size:16.5px;border-bottom:1px solid var(--dsw-alias-border-l1,#262b36);padding-bottom:5px}',
|
||||
|
||||
Reference in New Issue
Block a user