Skip to content

Commit e055922

Browse files
Notebook UI heading tweaks (microsoft#188117)
* Notebook UI heading tweaks * align styles
1 parent 3e07866 commit e055922

File tree

2 files changed

+46
-21
lines changed

2 files changed

+46
-21
lines changed

extensions/markdown-language-features/notebook/index.ts

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -176,42 +176,39 @@ export const activate: ActivationFunction<void> = (ctx) => {
176176
177177
hr {
178178
border: 0;
179-
height: 2px;
180-
border-bottom: 2px solid;
181-
}
182-
183-
h2, h3, h4, h5, h6 {
184-
font-weight: normal;
179+
height: 1px;
180+
border-bottom: 1px solid;
185181
}
186182
187183
h1 {
188-
font-size: 2.3em;
184+
font-size: 2em;
185+
margin-top: 0;
186+
padding-bottom: 0.3em;
187+
border-bottom-width: 1px;
188+
border-bottom-style: solid;
189189
}
190190
191191
h2 {
192-
font-size: 2em;
192+
font-size: 1.5em;
193+
padding-bottom: 0.3em;
194+
border-bottom-width: 1px;
195+
border-bottom-style: solid;
193196
}
194197
195198
h3 {
196-
font-size: 1.7em;
197-
}
198-
199-
h3 {
200-
font-size: 1.5em;
199+
font-size: 1.25em;
201200
}
202201
203202
h4 {
204-
font-size: 1.3em;
203+
font-size: 1em;
205204
}
206205
207206
h5 {
208-
font-size: 1.2em;
207+
font-size: 0.875em;
209208
}
210209
211-
h1,
212-
h2,
213-
h3 {
214-
font-weight: normal;
210+
h6 {
211+
font-size: 0.85em;
215212
}
216213
217214
div {
@@ -229,12 +226,38 @@ export const activate: ActivationFunction<void> = (ctx) => {
229226
}
230227
231228
/* Removes bottom margin when only one item exists in markdown cell */
232-
#preview > *:only-child,
233-
#preview > *:last-child {
229+
#preview > *:not(h1):not(h2):only-child,
230+
#preview > *:not(h1):not(h2):last-child {
234231
margin-bottom: 0;
235232
padding-bottom: 0;
236233
}
237234
235+
h1,
236+
h2,
237+
h3,
238+
h4,
239+
h5,
240+
h6 {
241+
font-weight: 600;
242+
margin-top: 24px;
243+
margin-bottom: 16px;
244+
line-height: 1.25;
245+
}
246+
247+
.vscode-light h1,
248+
.vscode-light h2,
249+
.vscode-light hr,
250+
.vscode-light td {
251+
border-color: rgba(0, 0, 0, 0.18);
252+
}
253+
254+
.vscode-dark h1,
255+
.vscode-dark h2,
256+
.vscode-dark hr,
257+
.vscode-dark td {
258+
border-color: rgba(255, 255, 255, 0.18);
259+
}
260+
238261
/* makes all markdown cells consistent */
239262
div {
240263
min-height: var(--notebook-markdown-min-height);

src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,14 @@ pre code {
132132
}
133133
134134
.vscode-light h1,
135+
.vscode-light h2,
135136
.vscode-light hr,
136137
.vscode-light td {
137138
border-color: rgba(0, 0, 0, 0.18);
138139
}
139140
140141
.vscode-dark h1,
142+
.vscode-dark h2,
141143
.vscode-dark hr,
142144
.vscode-dark td {
143145
border-color: rgba(255, 255, 255, 0.18);

0 commit comments

Comments
 (0)