Skip to content

Commit

Permalink
fix: correctly render partial borders (fix #1920) (#2010)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh committed Sep 22, 2019
1 parent d4b5896 commit eedb81e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/render/canvas/canvas-renderer.ts
Expand Up @@ -701,8 +701,9 @@ export class CanvasRenderer {
let side = 0;
for (const border of borders) {
if (border.style !== BORDER_STYLE.NONE && !isTransparent(border.color)) {
await this.renderBorder(border.color, side++, paint.curves);
await this.renderBorder(border.color, side, paint.curves);
}
side++;
}
}

Expand Down
7 changes: 7 additions & 0 deletions tests/reftests/border/solid.html
Expand Up @@ -40,6 +40,12 @@
border-bottom-width: 50px;
}

.box6 {
border-style: none solid none solid;
border-color: #807d32;
border-width: 50px;
}

html {
background: #3a84c3;
}
Expand All @@ -51,5 +57,6 @@
<div class="box3">&nbsp;</div>
<div class="box4">&nbsp;</div>
<div class="box5">&nbsp;</div>
<div class="box6">&nbsp;</div>
</body>
</html>

0 comments on commit eedb81e

Please sign in to comment.