Skip to content

Commit

Permalink
Fix some wrong conflict resolutions for table borders with inset and …
Browse files Browse the repository at this point in the history
…outset styles
  • Loading branch information
liZe committed May 31, 2015
1 parent 2d7f68e commit 4926196
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Bug fixes:
Remove unreachable area/border at bottom of page.
* `#225: <https://github.com/Kozea/WeasyPrint/issues/225>`_:
Don't allow unknown units during line-height validation.
* Fix some wrong conflict resolutions for table borders with inset
and outset styles.


Version 0.23
Expand Down
2 changes: 1 addition & 1 deletion weasyprint/formatting_structure/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,11 +675,11 @@ def set_one_border(border_grid, box_style, side, grid_x, grid_y):
style = box_style['border_%s_style' % side]
width = box_style['border_%s_width' % side]
color = box_style.get_color('border_%s_color' % side)
style = style_map.get(style, style)

# http://www.w3.org/TR/CSS21/tables.html#border-conflict-resolution
score = ((1 if style == 'hidden' else 0), width, style_scores[style])

style = style_map.get(style, style)
previous_score, _ = border_grid[grid_y][grid_x]
# Strict < so that the earlier call wins in case of a tie.
if previous_score < score:
Expand Down

0 comments on commit 4926196

Please sign in to comment.