Skip to content

Instantly share code, notes, and snippets.

@Moyf
Last active April 24, 2025 16:30
Beautified separator style for Obsidian
/* Moy OB 基础样式调节 */
/* Created: 2025-04-03 */
/* 注释文本变小 */
.cm-comment {
font-size: 0.8em;
opacity: 0.8;
}
/* 美化的分隔样式 */
/* ! 下划线后面的注释 */
/* Real-time editing mode */
.hr + .cm-line:has(.cm-comment) {
text-align: center !important;
padding-top: 0px !important;
.cm-formatting {
opacity: 0.0;
}
padding-bottom: 0.6em;
border-bottom: 2px solid var(--hr-color);
opacity: 1.0;
}
.hr + .cm-line.cm-active:has(.cm-comment) {
.cm-formatting {
opacity: 0.8;
}
}
/* Source code mode, only center text and add underline */
.HyperMD-hr + .cm-comment {
text-align: center !important;
border-bottom: 2px solid var(--hr-color);
}
/* This version uses *emphesis text* after the underline - it could be used in reading view! */
/* Live Editing */
.hr + .cm-line:has(.cm-em) {
text-align: center !important;
padding-top: 0px !important;
padding-bottom: 0.6em;
border-bottom: 2px solid var(--hr-color);
opacity: 1.0;
.cm-em {
opacity: 0.6;
}
}
/* Source Mode */
.HyperMD-hr + .cm-line:has(.cm-em) {
text-align: center !important;
border-bottom: 2px solid var(--hr-color);
}
/* Reading Mode */
.el-hr + .el-p:has(em) {
text-align: center;
padding-top: 0px !important;
p {
margin-top: 0em;
opacity: 0.8;
margin-bottom: 0em;
}
margin-top: -1.5em;
margin-bottom: 0em;
padding-bottom: 0.4em;
border-bottom: 2px solid var(--hr-color);
opacity: 1.0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment