Skip to content

Commit 2dcf721

Browse files
Stephan AngoStephan Ango
authored andcommitted
Fix for headings in bullet lists
1 parent 860f58a commit 2dcf721

File tree

1 file changed

+39
-15
lines changed

1 file changed

+39
-15
lines changed

obsidian.css

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Disabled features */
120120
121121
Font styles
122122
123-
Preview mode and UI */
123+
/* Preview mode */
124124

125125
--text:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
126126

@@ -132,6 +132,10 @@ Disabled features */
132132

133133
--font-monospace:Menlo,SFMono-Regular,Consolas,"Roboto Mono",monospace;
134134

135+
/* UI */
136+
137+
--font-ui:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
138+
135139
/* Sizes, weights, padding */
136140

137141
--font-normal:16px;
@@ -618,10 +622,16 @@ MINIMAL STYLING */
618622
h1,h2,h3,h4,h5,strong {font-weight:var(--bold-weight);}
619623
h1,h2,h3,h4 {letter-spacing:-0.02em;}
620624

625+
body, input, button {
626+
font-family:var(--font-ui);
627+
}
628+
629+
.workspace-leaf-content[data-type=markdown] {
630+
font-family:var(--text)
631+
}
621632
body, input, button,
622633
.cm-s-obsidian .cm-formatting-hashtag,
623634
.cm-s-obsidian {
624-
font-family:var(--text) !important;
625635
font-size:var(--font-normal);
626636
font-weight:var(--normal-weight);
627637
line-height:var(--line-height);
@@ -631,15 +641,15 @@ body, input, button,
631641
.cm-s-obsidian .cm-formatting-hashtag,
632642
.cm-s-obsidian {
633643
line-height:var(--line-height);
634-
font-family:var(--text-editor) !important;
644+
font-family:var(--text-editor);
635645
}
636646
.cm-s-obsidian .cm-header,
637647
.cm-s-obsidian .cm-strong {
638648
font-weight:var(--bold-weight);
639649
}
640650
.cm-formatting-header {
641-
color:var(--text-faint) !important;
642-
font-weight:var(--normal-weight) !important;
651+
color:var(--text-faint);
652+
font-weight:var(--normal-weight);
643653
}
644654
.view-header-title,
645655
.file-embed-title,
@@ -1414,7 +1424,8 @@ input[type='search'],
14141424
input[type='email'],
14151425
input[type='password'],
14161426
input[type='number'] {
1417-
font-size:var(--font-normal);
1427+
font-family:var(--font-ui);
1428+
font-size:var(--font-normal);
14181429
}
14191430

14201431
select:focus,
@@ -1580,6 +1591,12 @@ input[type=checkbox]:checked {
15801591
transform:rotate(0deg);
15811592
}*/
15821593

1594+
.tooltip {
1595+
font-size:var(--font-small);
1596+
line-height:1.2;
1597+
padding:4px 8px;
1598+
border-radius:4px;
1599+
}
15831600
.nav-file {
15841601
margin-left:12px;
15851602
padding-right:4px;
@@ -1743,11 +1760,11 @@ h5:hover .heading-collapse-indicator.collapse-indicator svg,
17431760
.markdown-preview-view .collapse-indicator:hover svg {
17441761
opacity:1;
17451762
}
1746-
.markdown-preview-view .is-collapsed h1::after,
1747-
.markdown-preview-view .is-collapsed h2::after,
1748-
.markdown-preview-view .is-collapsed h3::after,
1749-
.markdown-preview-view .is-collapsed h4::after,
1750-
.markdown-preview-view .is-collapsed h5::after,
1763+
.markdown-preview-view div.is-collapsed h1::after,
1764+
.markdown-preview-view div.is-collapsed h2::after,
1765+
.markdown-preview-view div.is-collapsed h3::after,
1766+
.markdown-preview-view div.is-collapsed h4::after,
1767+
.markdown-preview-view div.is-collapsed h5::after,
17511768
.markdown-preview-view ol .is-collapsed::after,
17521769
.markdown-preview-view ul .is-collapsed::after {
17531770
content:"...";
@@ -1795,6 +1812,12 @@ h5:hover .heading-collapse-indicator.collapse-indicator svg,
17951812
.list-collapse-indicator .collapse-indicator .collapse-icon {
17961813
opacity:0;
17971814
}
1815+
.markdown-preview-view ul > li h1,
1816+
.markdown-preview-view ul > li h2,
1817+
.markdown-preview-view ul > li h3,
1818+
.markdown-preview-view ul > li h4 {
1819+
display:inline;
1820+
}
17981821

17991822
/* Folding icons in Edit mode */
18001823

@@ -1876,6 +1899,9 @@ h5:hover .heading-collapse-indicator.collapse-indicator svg,
18761899
/* --------------- */
18771900
/* Search */
18781901

1902+
.search-result-container.mod-global-search {
1903+
padding-left:10px;
1904+
}
18791905
.search-result-file-match {
18801906
cursor:var(--cursor) !important;
18811907
}
@@ -1980,11 +2006,9 @@ input.search-input:focus {
19802006
padding:4px 4px 4px 24px;
19812007
vertical-align:middle;
19822008
cursor:var(--cursor)!important;
1983-
overflow:hidden;
1984-
text-overflow:ellipsis;
19852009
}
19862010
.tree-item-inner,
1987-
.search-result-file-title > span:not(.search-result-collapse-indicator):not(.search-result-count) {
2011+
.search-result-file-title {
19882012
white-space:nowrap;
19892013
overflow:hidden;
19902014
text-overflow:ellipsis;
@@ -2637,7 +2661,7 @@ input[type=range]::-webkit-slider-thumb:active {
26372661
}
26382662
.dropdown {
26392663
border-color:var(--background-modifier-border);
2640-
font-family:var(--text);
2664+
font-family:var(--font-ui);
26412665
background-image:url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
26422666
}
26432667
.theme-dark .dropdown {

0 commit comments

Comments
 (0)