求助 首行缩进css代码没有用?


(新用户只能传一张图?)


所以是哪里出了问题……

检查下设置》编辑器》严格换行 是不是关闭状态

是关闭的。
我后来捣鼓了一下,好像是因为新版不兼容代码了
现在只能 旧版编辑器+css+codemirror 实现首行缩进
可是我主要用移动端,没法切编辑器qaq

/*编辑模式 */
.markdown-source-view.mod-cm6 .cm-line:not(.HyperMD-header){
text-indent: 2em;
}
/* 阅读模式 */
.markdown-preview-section p{
text-indent: 2em;
}

改了下在最新版1.0有效,但不知道有没有副作用,可以试试,或者问问其他大佬

2 个赞

感谢!我也从BT里面扒了一段

source-view.mod-cm6 div.cm-line:not(.HyperMD-header),
.markdown-source-view.mod-cm6.indent div.cm-line:not(.HyperMD-header) {
  text-indent: 2em;
}

body.text-indentation-two-em .markdown-source-view.mod-cm6 div.cm-line:not(.HyperMD-header) .cm-hmd-frontmatter:first-of-type,
.markdown-source-view.mod-cm6.indent div.cm-line:not(.HyperMD-header) .cm-hmd-frontmatter:first-of-type {
  margin-left: -2em;
}

body.text-indentation-two-em .markdown-source-view.mod-cm6 div.has-banner.cm-line:not(.HyperMD-header) .cm-def.cm-hmd-frontmatter,
body.text-indentation-two-em .markdown-source-view.mod-cm6 div.has-banner.cm-line:not(.HyperMD-header) .collapse-indicator,
.markdown-source-view.mod-cm6.indent div.has-banner.cm-line:not(.HyperMD-header) .cm-def.cm-hmd-frontmatter,
.markdown-source-view.mod-cm6.indent div.has-banner.cm-line:not(.HyperMD-header) .collapse-indicator {
  margin-left: 0;
  left: -3em;
}

在yaml声明cssclass: indent可以对单篇笔记生效(编辑模式)

2 个赞

感谢回复!BT 应该会比我专业许多 :joy: :joy: :joy:

实测好用,暂时没有发现副作用