aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/default.css5
-rw-r--r--src/layout/engine.nim2
2 files changed, 6 insertions, 1 deletions
diff --git a/res/default.css b/res/default.css
index fe0e99d7..56691cbb 100644
--- a/res/default.css
+++ b/res/default.css
@@ -53,6 +53,11 @@ pre {
white-space: pre;
}
+p {
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
a {
color: yellow;
}
diff --git a/src/layout/engine.nim b/src/layout/engine.nim
index 6ca232b7..0fbaf882 100644
--- a/src/layout/engine.nim
+++ b/src/layout/engine.nim
@@ -116,7 +116,7 @@ proc processInlineBox(parent: CSSBox, str: string): CSSBox =
ibox.context.whitespace = false
fastRuneAt(str, i, r)
rw = r.width()
- if rowbox.width + r.width() > ibox.width:
+ if fromx + rowbox.width + r.width() > ibox.width:
inlineWrap(ibox, rowi, fromx, rowbox)
rowbox.width += rw