Skip to content

Commit b8e773e

Browse files
fix styling to improve heading spacing fixes microsoft#102036 (microsoft#102427)
* updating styling to make headings look better * be consistent and use em
1 parent f4d766c commit b8e773e

1 file changed

Lines changed: 31 additions & 3 deletions

File tree

extensions/markdown-language-features/media/markdown.css

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ html, body {
1111
word-wrap: break-word;
1212
}
1313

14+
body {
15+
padding-top: 1em;
16+
}
17+
18+
/* Reset margin top for elements */
19+
h1, h2, h3, h4, h5, h6,
20+
p, ol, ul, pre {
21+
margin-top: 0;
22+
}
23+
24+
h2, h3, h4, h5, h6 {
25+
font-weight: normal;
26+
margin-bottom: 0.2em;
27+
}
28+
29+
1430
#code-csp-warning {
1531
position: fixed;
1632
top: 0;
@@ -112,6 +128,20 @@ textarea:focus {
112128
outline-offset: -1px;
113129
}
114130

131+
p {
132+
margin-bottom: 1.5em;
133+
}
134+
135+
/* don't space 2 paragraphs too far apart */
136+
p + p {
137+
margin-top: -0.8em;
138+
}
139+
140+
ul,
141+
ol {
142+
margin-bottom: 1.5em;
143+
}
144+
115145
hr {
116146
border: 0;
117147
height: 2px;
@@ -123,10 +153,8 @@ h1 {
123153
line-height: 1.2;
124154
border-bottom-width: 1px;
125155
border-bottom-style: solid;
126-
}
127-
128-
h1, h2, h3 {
129156
font-weight: normal;
157+
margin-bottom: 1.5em;
130158
}
131159

132160
table {

0 commit comments

Comments
 (0)