Typora-macOS 风格代码块

news2025/6/2 0:13:31

效果:

替换 Typora安装目录中 themes 文件夹下的  base.user.css 文件,直接替换即可,建议先备份。

css:

/* ================= 语法高亮配色 ================= */
.CodeMirror-line .cm-number { color: #b5cea8; }       /* 数字 - 浅绿色 */
.CodeMirror-line .cm-property { color: #9cdcfe; }    /* 属性 - 浅蓝色 */
.CodeMirror-line .cm-variable-3 { color: #4ec9b0; }  /* 类型/返回值 - 青蓝色 */
.CodeMirror-line .cm-qualifier { color: #d7ba7d; }   /* 限定符 - 金色 */
.CodeMirror-line .cm-variable-2 { color: #9cdcfe; }  /* 变量 - 浅蓝色 */
.CodeMirror-line .cm-meta { color: #569cd6; }        /* 宏/头文件 - 蓝色 */
.CodeMirror-line .cm-atom { color: #569cd6; }        /* true/false - 蓝色 */
.CodeMirror-line .cm-keyword { color: #c586c0; }     /* 关键字 - 紫色 */
.CodeMirror-line .cm-def { color: #dcdcaa; }         /* 函数定义 - 浅黄色 */
.CodeMirror-line .cm-variable { color: #9cdcfe; }    /* 变量 - 浅蓝色 */
.CodeMirror-line .cm-builtin { color: #dcdcaa; }     /* 内置函数 - 浅黄色 */
.CodeMirror-line .cm-comment { 
    color: #6a9955;                  /* 注释 - 绿色 */
}
.CodeMirror-line .cm-string { color: #ce9178; }      /* 字符串 - 橙红色 */
.CodeMirror-line .cm-string-2 { color: #ce9178; }    /* 模板字符串 - 橙红色 */
.CodeMirror-line .cm-operator { color: #d4d4d4; }    /* 操作符 - 白色 */
.CodeMirror-line .cm-tag { color: #569cd6; }         /* HTML标签 - 蓝色 */
.CodeMirror-line .cm-bracket { color: #808080; }     /* 括号 - 灰色 */
.CodeMirror-line .cm-attribute { color: #9cdcfe; }   /* HTML属性 - 浅蓝色 */
 
/* 计数器相关的CSS规则 如需要可启用 */
/*
.sidebar-content {
    counter-reset: h1
}
 
.outline-h1 {
    counter-reset: h2
}
 
.outline-h2 {
    counter-reset: h3
}
 
.outline-h3 {
    counter-reset: h4
}
 
.outline-h4 {
    counter-reset: h5
}
 
.outline-h5 {
    counter-reset: h6
}
 
.outline-h1>.outline-item>.outline-label:before {
    counter-increment: h1;
    content: counter(h1) " "
}
 
.outline-h2>.outline-item>.outline-label:before {
    counter-increment: h2;
    content: counter(h1) "."counter(h2) " "
}
 
.outline-h3>.outline-item>.outline-label:before {
    counter-increment: h3;
    content: counter(h1) "."counter(h2) "."counter(h3) " "
}
 
.outline-h4>.outline-item>.outline-label:before {
    counter-increment: h4;
    content: counter(h1) "."counter(h2) "."counter(h3) "."counter(h4) " "
}
 
.outline-h5>.outline-item>.outline-label:before {
    counter-increment: h5;
    content: counter(h1) "."counter(h2) "."counter(h3) "."counter(h4) "."counter(h5) " "
}
 
.outline-h6>.outline-item>.outline-label:before {
    counter-increment: h6;
    content: counter(h1) "."counter(h2) "."counter(h3) "."counter(h4) "."counter(h5) "."counter(h6) " "
}
 
#write {
    counter-reset: h1
}
 
h1 {
    counter-reset: h2
}
 
h2 {
    counter-reset: h3
}
 
h3 {
    counter-reset: h4
}
 
h4 {
    counter-reset: h5
}
 
h5 {
    counter-reset: h6
}
 
#write h1:before {
    counter-increment: h1;
    content: counter(h1) " "
}
 
#write h2:before {
    counter-increment: h2;
    content: counter(h1) "."counter(h2) " "
}
 
#write h3:before,
h3.md-focus.md-heading:before
 
    {
    counter-increment: h3;
    content: counter(h1) "."counter(h2) "."counter(h3) " "
}
 
#write h4:before,
h4.md-focus.md-heading:before {
    counter-increment: h4;
    content: counter(h1) "."counter(h2) "."counter(h3) "."counter(h4) " "
}
 
#write h5:before,
h5.md-focus.md-heading:before {
    counter-increment: h5;
    content: counter(h1) "."counter(h2) "."counter(h3) "."counter(h4) "."counter(h5) " "
}
 
#write h6:before,
h6.md-focus.md-heading:before {
    counter-increment: h6;
    content: counter(h1) "."counter(h2) "."counter(h3) "."counter(h4) "."counter(h5) "."counter(h6) " "
}
*/
 
#write>h3.md-focus:before,
#write>h4.md-focus:before,
#write>h5.md-focus:before,
#write>h6.md-focus:before,
h3.md-focus:before,
h4.md-focus:before,
h5.md-focus:before,
h6.md-focus:before {
    color: inherit;
    border: inherit;
    border-radius: inherit;
    position: inherit;
    left: initial;
    float: none;
    top: initial;
    font-size: inherit;
    padding-left: inherit;
    padding-right: inherit;
    vertical-align: inherit;
    font-weight: inherit;
    line-height: inherit;
}
 
.CodeMirror-lines {
    padding-left: 4px;
}
 
.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}
 
.md-fences,
code,
tt {
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding-left: 4px !important;
    padding-right: 4px !important;
    font-size: 0.9em;
}
 
code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}
 
.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}
 
 
.md-task-list-item > input {
  margin-left: -1.3em;
}
 
@media print {
    html {
 font-size: 13px;
    }
    table,
    pre {
 page-break-inside: avoid;
    }
    pre {
 word-wrap: break-word;
    }
}
 
.md-fences {
    background-color: #f8f8f8;
}
#write pre.md-meta-block {
    padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}
 
.mathjax-block>.code-tooltip {
    bottom: .375rem;
}
 
 
 
 
 
#write .md-fences:not([mermaid-type])  {
    padding-top: 7px;
    border-radius: 10px;
    background-color: #282c34;
    color: #eeeeee;
}
 
.code-tooltip .ty-input,
.code-tooltip input {
    color: #eee;
}
 
 
 
.CodeMirror-wrap .CodeMirror-scroll {
    padding-top: 20px;
}
 
#write .md-fences:before {
    content: "";
    z-index: 4;
    display: block;
    position: absolute;
    top: 7px;
    left: 13px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    float: left;
    background-color: #fa3534;
}
 
#write .CodeMirror-scroll:before {
    content: "";
    display: block;
    position: absolute;
    top: 0px;
    left: 29px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    float: left;
    z-index: 999;
    background-color: #ff9900;
}
#write .md-fences::after {
    content: "";
    z-index: 4;
    display: block;
    position: absolute;
    top: 7px;
    left: 53px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    float: left;
    background-color: #19be6b;
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2393148.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

ansible自动化playbook简单实践

方法一:部分使用ansible 基于现有的nginx配置文件,定制部署nginx软件,将我们的知识进行整合 定制要求: 启动用户:nginx-test,uid是82,系统用户,不能登录 启动端口82 web项目根目录/…

20250526惠普HP锐14 AMD锐龙 14英寸轻薄笔记本电脑(八核R7-7730U)的显卡驱动下载

20250526惠普HP锐14 AMD锐龙 14英寸轻薄笔记本电脑(八核R7-7730U)的显卡驱动下载 2025/5/26 14:44 百度:AMD 7700 显卡驱动 amd APU 显卡驱动 https://item.jd.com/100054819707.html 惠普HP【国家补贴20%】锐14 AMD锐龙 14英寸轻薄笔记本电脑(八核R7-7730U 16G 1T…

2025年5月蓝桥杯stema省赛真题——象棋移动

上方题目可点下方去处,支持在线编程~ 象棋移动_scratch_少儿编程题库学习中心-嗨信奥 程序演示可点下方,支持源码和素材获取~ 象棋移动-scratch作品-少儿编程题库学习中心-嗨信奥 题库收集了历届各白名单赛事真题和权威机构考级…

AI重构SEO关键词精准定位

内容概要 随着AI技术深度渗透数字营销领域,传统SEO关键词定位模式正经历系统性重构。基于自然语言处理(NLP)的智能语义分析引擎,可突破传统关键词工具的局限性,通过解析长尾搜索词中的隐含意图与语境关联,…

SPSS跨域分类:自监督知识+软模板优化

1. 图1:SPSS方法流程图 作用:展示了SPSS方法的整体流程,从数据预处理到模型预测的关键步骤。核心内容: 领域知识提取:使用三种词性标注工具(NLTK、spaCy、TextBlob)从源域和目标域提取名词或形容词(如例句中提取“excellent”“good”等形容词)。词汇交集与聚类:对提…

vscode的Embedded IDE创建keil项目找不到源函数或者无法跳转

创建完Embedded IDE项目后跳转索引很容易找不到源函数或者无法跳转,原因是vscode工作区被eide覆盖了,需要手动往当前目录下的.vscode/c_cpp_properties.json里添加路径 打开eide.json ,找到folders, 里面的name是keil里工程的虚拟…

构建高效智能客服系统的8大体验设计要点

构建一流的客户服务中心体验,企业需要以用户需求为核心,将智能化流程、前沿科技与人文关怀有机结合,打造流畅、高效且富有温度的服务生态。在客户需求日益多元化的今天,单纯的问题解决能力已无法满足期待,关键在于通过…

CppCon 2014 学习:Making C++ Code Beautiful

你说的完全正确,也很好地总结了 C 这门语言在社区中的两种典型看法: C 的优点(Praise) 优点含义Powerful允许底层控制、系统编程、高性能计算、模板元编程、并发等多种用途Fast无运行时开销,接近汇编级别性能&#x…

据传苹果将在WWDC上发布iOS 26 而不是iOS 19

苹果可能会对其操作系统的编号方式做出重大改变,基于年份的新版系统会将iOS 19重新命名为 iOS 26,同时 macOS 也会以同样的方式命名。 苹果的编号系统相当简单,版本号每年都会像钟表一样定期更新。然而,今年秋天情况可能有所不同&…

嵌入式开发STM32 -- 江协科技笔记

1.背景介绍及基础认知 8大输入输出 斯密特触发器:高于设定阈值输出高电平,低于设定阈值输出低电平 有关上拉输入、下拉输入、推挽输出、开漏输出、复用开漏输出、复用推挽输出以及浮空输入、模拟输入的区别 1、上拉输入:上拉就是把电位拉高…

[网页五子棋][用户模块]客户端开发(登录功能和注册功能)

文章目录 客户端开发登录功能htmlcsscommon.csslogin.css jQuery引入 jquery 运行程序注册功能 客户端开发 登录功能 html <!DOCTYPE html> <html lang"en"> <head> <meta charset"UTF-8"> <meta name"viewport&…

MQTT协议,EMQX部署,MQTTX安装学习

一、MQTT概述 1.什么是MQTT MQTT是一种基于“发布订阅“”模式的消息传输协议。 消息&#xff1a;设备和设备之间传输的数据&#xff0c;或者服务和服务之间要传输的数据。 协议&#xff1a;传输数据时所遵循的规范。 2.常见的通讯模式 &#xff08;1&#xff09;客户端-服…

60天python训练计划----day40

DAY 40 训练和测试的规范写法 知识点回顾&#xff1a; 彩色和灰度图片测试和训练的规范写法&#xff1a;封装在函数中展平操作&#xff1a;除第一个维度batchsize外全部展平dropout操作&#xff1a;训练阶段随机丢弃神经元&#xff0c;测试阶段eval模式关闭dropout 一.单通道图…

干泵,干式螺杆真空泵

干式真空泵&#xff1a; 无油干式机械真空泵&#xff08;又简称干式机械泵&#xff09;是指泵能从大气压力下开始抽气&#xff0c;又能将被抽气体直接排到大气中去&#xff0c;泵腔内无油或其他工作介质&#xff0c;而且泵的极限压力与油封式真空泵同等量级或者接近的机械真空泵…

Tailwind CSS 实战:基于 Kooboo 构建 AI 对话框页面(五):语音合成输出与交互增强

Tailwind CSS 实战&#xff0c;基于Kooboo构建AI对话框页面&#xff08;一&#xff09; Tailwind CSS 实战&#xff0c;基于Kooboo构建AI对话框页面&#xff08;二&#xff09;&#xff1a;实现交互功能 Tailwind CSS 实战&#xff0c;基于 Kooboo 构建 AI 对话框页面&#x…

职业本科院校无人机专业人才培养解决方案

2023年的中央经济工作会议强调了以科技创新推动现代化产业体系构建的重要性&#xff0c;并提出发展生物制造、商业航天、低空经济等战略性新兴产业。低空经济&#xff0c;依托民用无人机等低空飞行器&#xff0c;在多场景低空飞行活动的牵引下&#xff0c;正逐步形成一个辐射广…

软件评测机构如何保障质量?检测资质、技术实力缺一不可

软件评测机构在保障软件质量上起着关键作用&#xff0c;对软件行业的健康发展极为关键。它们采用专业的技术手段和严格的评估流程&#xff0c;对软件的运行效果、功能等多方面进行细致的审查&#xff0c;为开发者和使用者提供了客观、公正的参考依据。 检测资质正规软件评测机…

Linux多线程(六)之线程控制4【线程ID及进程地址空间布局】

文章目录 线程ID及进程地址空间布局线程局部存储 线程ID及进程地址空间布局 pthread_ create函数会产生一个线程ID&#xff0c;存放在第一个参数指向的地址中。 该线程ID和前面说的线程ID不是一回事。 前面讲的线程ID属于进程调度的范畴。 ​ 因为线程是轻量级进程&#xff…

1.什么是node.js、npm、vue

一、Node.js 是什么&#xff1f; &#x1f63a; 定义&#xff1a; Node.js 是一个基于 Chrome V8 引擎的 JavaScript 运行时环境&#xff0c;让你可以在浏览器之外运行 JavaScript 代码&#xff0c;主要用于服务端开发。 &#x1f63a;从计算机底层说&#xff1a;什么是“运…

Xamarin入门笔记(Xamarin已经被MAUI取代)

初级代码游戏的专栏介绍与文章目录-CSDN博客 Xamarin入门 概述 环境 Android开发环境比较简单&#xff0c;自带模拟器&#xff0c;实体机打开开发者模式即可。 iOS开发环境比较复杂&#xff0c;必须搭配Mac电脑&#xff0c;Windows连接Mac开发可能有问题&#xff08;比如发…