diff --git a/data/themes/default-theme.yml b/data/themes/default-theme.yml index 86ffa1589..e2589c3cd 100644 --- a/data/themes/default-theme.yml +++ b/data/themes/default-theme.yml @@ -71,6 +71,8 @@ literal: font_color: b12146 font_family: M+ 1mn menu_caret_content: " \u203a " +button: + background_color: e7e7e7 heading: #font_color: 181818 font_color: $base_font_color diff --git a/lib/asciidoctor-pdf/converter.rb b/lib/asciidoctor-pdf/converter.rb index 26cda3482..b14c82f05 100644 --- a/lib/asciidoctor-pdf/converter.rb +++ b/lib/asciidoctor-pdf/converter.rb @@ -1406,8 +1406,16 @@ def convert_inline_break node %(#{node.text}
) end - def convert_inline_button node - %([#{NarrowNoBreakSpace}#{node.text}#{NarrowNoBreakSpace}]) + def convert_inline_button node + button_bg_color = resolve_theme_color :button_background_color + if (button_bg_color) + # TODO use the button_bg_color to set the background of the node.text. Maybe similar to the following? + #%( rgb=#{button_bg_color}>[#{node.text}]) + # Remove the following line once the TODO is fixed + %([#{NarrowNoBreakSpace}#{node.text}#{NarrowNoBreakSpace}]) + else + %([#{NarrowNoBreakSpace}#{node.text}#{NarrowNoBreakSpace}]) + end end def convert_inline_callout node