diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2016-09-25 01:42:09 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2016-09-25 01:43:46 -0600 |
| commit | ca979a9ccdbe9ed8559e97f14263f5737d96dbfb (patch) | |
| tree | 7c41f2daf1468921d62216e1955cd3c16be72fa4 | |
| parent | f502de693ec3cfdbcc1dab21dcaec62fa2e5b5d8 (diff) | |
set fallback color for table grid and border color
- table border color should fallback to table grid color
- table grid color should fallback to table border color
- if neither table border or grid color are set, fallback to base border color
| -rw-r--r-- | lib/asciidoctor-pdf/converter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asciidoctor-pdf/converter.rb b/lib/asciidoctor-pdf/converter.rb index 0f5a13c9..635f314a 100644 --- a/lib/asciidoctor-pdf/converter.rb +++ b/lib/asciidoctor-pdf/converter.rb @@ -1335,7 +1335,7 @@ class Converter < ::Prawn::Document table_data = [[{ content: '' }]] if table_data.empty? border = {} - table_border_color = theme.table_border_color + table_border_color = theme.table_border_color || table_grid_color || theme.base_border_color table_border_width = theme.table_border_width table_grid_width = theme.table_grid_width || theme.table_border_width [:top, :bottom, :left, :right].each {|edge| border[edge] = table_border_width } @@ -1392,7 +1392,7 @@ class Converter < ::Prawn::Document padding: theme.table_cell_padding, border_width: 0, # NOTE the border color of edges is set later - border_color: theme.table_grid_color || theme.table_border_color + border_color: theme.table_grid_color || theme.table_border_color || theme.base_border_color }, width: table_width, column_widths: column_widths, |
