This commit is contained in:
Gavin Nishizawa 2022-11-08 19:01:27 -08:00
parent 8d5314d66e
commit d26967c1a2
16 changed files with 0 additions and 139 deletions

View file

@ -258,9 +258,6 @@
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -345,15 +342,9 @@
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

View file

@ -242,11 +242,8 @@ func (ruler *Ruler) measureNode(depth int, n *html.Node, font d2fonts.Font) (wid
w *= FontSize_pre_code_em
h *= FontSize_pre_code_em
}
// fmt.Printf("%d:'%s' width %v (%v) height %v fontStyle %s fontSize %v family %v\n", depth, n.Data, w, w+spaceWidths, h, font.Style, font.Size, font.Family)
return w + spaceWidths, h, 0, 0
case html.ElementNode:
// fmt.Printf("%d: %v node\n", depth, n.Data)
switch n.Data {
case "h1", "h2", "h3", "h4", "h5", "h6":
font = HeaderFonts[n.Data]
@ -352,7 +349,6 @@ func (ruler *Ruler) measureNode(depth int, n *html.Node, font d2fonts.Font) (wid
if height > 0 && height < MarkdownLineHeightPx {
height = MarkdownLineHeightPx
}
// fmt.Printf("%d:%s width %v height %v mt %v mb %v\n", depth, n.Data, width, height, marginTop, marginBottom)
}
return width, height, marginTop, marginBottom
}

View file

@ -272,9 +272,6 @@ width="1317" height="1854" viewBox="-100 -100 1317 1854"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="1317" height="1854" viewBox="-100 -100 1317 1854"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 813 KiB

After

Width:  |  Height:  |  Size: 813 KiB

View file

@ -272,9 +272,6 @@ width="3251" height="5500" viewBox="-100 -100 3251 5500"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="3251" height="5500" viewBox="-100 -100 3251 5500"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 994 KiB

After

Width:  |  Height:  |  Size: 993 KiB

View file

@ -272,9 +272,6 @@ width="938" height="786" viewBox="-100 -100 938 786"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="938" height="786" viewBox="-100 -100 938 786"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 660 KiB

After

Width:  |  Height:  |  Size: 660 KiB

View file

@ -272,9 +272,6 @@ width="579" height="752" viewBox="-100 -100 579 752"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="579" height="752" viewBox="-100 -100 579 752"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 660 KiB

After

Width:  |  Height:  |  Size: 660 KiB

View file

@ -272,9 +272,6 @@ width="445" height="728" viewBox="-100 -100 445 728"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="445" height="728" viewBox="-100 -100 445 728"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 803 KiB

After

Width:  |  Height:  |  Size: 803 KiB

View file

@ -272,9 +272,6 @@ width="547" height="1164" viewBox="-100 -100 547 1164"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="547" height="1164" viewBox="-100 -100 547 1164"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 661 KiB

After

Width:  |  Height:  |  Size: 661 KiB

View file

@ -272,9 +272,6 @@ width="1120" height="1028" viewBox="-100 -100 1120 1028"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="1120" height="1028" viewBox="-100 -100 1120 1028"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 842 KiB

After

Width:  |  Height:  |  Size: 842 KiB

View file

@ -272,9 +272,6 @@ width="466" height="702" viewBox="-100 -100 466 702"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="466" height="702" viewBox="-100 -100 466 702"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 660 KiB

After

Width:  |  Height:  |  Size: 660 KiB

View file

@ -272,9 +272,6 @@ width="731" height="838" viewBox="-100 -100 731 838"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="731" height="838" viewBox="-100 -100 731 838"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 803 KiB

After

Width:  |  Height:  |  Size: 803 KiB

View file

@ -272,9 +272,6 @@ width="396" height="763" viewBox="-100 -100 396 763"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="396" height="763" viewBox="-100 -100 396 763"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 841 KiB

After

Width:  |  Height:  |  Size: 841 KiB

View file

@ -272,9 +272,6 @@ width="412" height="803" viewBox="-100 -100 412 803"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="412" height="803" viewBox="-100 -100 412 803"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 841 KiB

After

Width:  |  Height:  |  Size: 841 KiB

View file

@ -272,9 +272,6 @@ width="313" height="676" viewBox="-100 -100 313 676"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="313" height="676" viewBox="-100 -100 313 676"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 841 KiB

After

Width:  |  Height:  |  Size: 841 KiB

View file

@ -272,9 +272,6 @@ width="2057" height="676" viewBox="-100 -100 2057 676"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="2057" height="676" viewBox="-100 -100 2057 676"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 660 KiB

After

Width:  |  Height:  |  Size: 660 KiB

View file

@ -272,9 +272,6 @@ width="802" height="822" viewBox="-100 -100 802 822"><style type="text/css">
.md kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono,
monospace;
line-height: 10px;
color: var(--color-fg-default);
vertical-align: middle;
background-color: var(--color-canvas-subtle);
@ -359,15 +356,9 @@ width="802" height="822" viewBox="-100 -100 802 822"><style type="text/css">
margin-left: 0;
}
/* .md tt,
.md code {
font-size: 12px;
} */
.md pre {
margin-top: 0;
margin-bottom: 0;
/* font-size: 12px; */
word-wrap: normal;
}

Before

Width:  |  Height:  |  Size: 841 KiB

After

Width:  |  Height:  |  Size: 841 KiB