Homemade Source/Css Snippets
[CSS Snippet] Live Preview 모드에서 헤딩 레벨 표시
반응형
옵시디언 Live Preview 모드에서 헤딩 레벨을 표시해주는 CSS snippet입니다.
예시
CSS 코드
.is-live-preview div:not(.HyperMD-header.HyperMD-header-1.cm-line.cm-active) > span.cm-header.cm-header-1::before,
.is-live-preview div:not(.HyperMD-header.HyperMD-header-2.cm-line.cm-active) > span.cm-header.cm-header-2::before,
.is-live-preview div:not(.HyperMD-header.HyperMD-header-3.cm-line.cm-active) > span.cm-header.cm-header-3::before,
.is-live-preview div:not(.HyperMD-header.HyperMD-header-4.cm-line.cm-active) > span.cm-header.cm-header-4::before,
.is-live-preview div:not(.HyperMD-header.HyperMD-header-5.cm-line.cm-active) > span.cm-header.cm-header-5::before,
.is-live-preview div:not(.HyperMD-header.HyperMD-header-6.cm-line.cm-active) > span.cm-header.cm-header-6::before{
color: #6b6d6f;
margin-right: 0px;
font-size: 0.8rem;
margin-right: 5px;
font-weight: normal;
}
.is-live-preview div:not(.HyperMD-header.HyperMD-header-1.cm-line.cm-active) > span.cm-header.cm-header-1::before{
content: 'H1';
}
.is-live-preview div:not(.HyperMD-header.HyperMD-header-2.cm-line.cm-active) > span.cm-header.cm-header-2::before{
content: 'H2';
}
.is-live-preview div:not(.HyperMD-header.HyperMD-header-3.cm-line.cm-active) > span.cm-header.cm-header-3::before{
content: 'H3';
}
.is-live-preview div:not(.HyperMD-header.HyperMD-header-4.cm-line.cm-active) > span.cm-header.cm-header-4::before{
content: 'H4';
}
.is-live-preview div:not(.HyperMD-header.HyperMD-header-5.cm-line.cm-active) > span.cm-header.cm-header-5::before{
content: 'H5';
}
.is-live-preview div:not(.HyperMD-header.HyperMD-header-6.cm-line.cm-active) > span.cm-header.cm-header-6::before{
content: 'H6';
}
관련 플러그인
반응형
'Homemade Source > Css Snippets' 카테고리의 다른 글
[CSS Snippet] PLN 테마 callout (0) | 2024.02.24 |
---|---|
[CSS Snippet] 태그 색상 변경하기 (0) | 2024.02.21 |
[CSS Snippet] Mermaid를 노트 가로사이즈에 맞게 조정하기 (0) | 2024.02.17 |
[CSS Snippet] 내부링크에 아이콘 넣기 (0) | 2024.02.17 |
[CSS Snippet] 편집모드에서 코드블록에 줄 번호 표시 (0) | 2024.02.11 |