Compare commits

...

2 Commits

Author SHA1 Message Date
raoul 2bcfdaf0de Merge pull request 'Make style generator handle the default section properly.' (#3) from renderer-options into master
Reviewed-on: raoul/python-chordpro#3
2021-08-31 23:39:22 +00:00
raoul f8145b4c43 Merge pull request 'Enhance the HTML renderer' (#1) from renderer-options into master
Create a get_option_groups() method to return the groups, which are now built dynamically

Reviewed-on: raoul/python-chordpro#1
2021-08-31 16:33:15 -07:00
1 changed files with 4 additions and 0 deletions

View File

@ -414,6 +414,10 @@ def get_option_groups():
def make_style(name, font=None, size=None, is_bold=None, is_centered=None, is_upper=None, indent=None):
"""Build a CSS style"""
styles = []
if name == 'default':
styles.append('html, body, * {')
else:
styles.append('.{name} {{'.format(name=name))
if font:
styles.append(' font-family: \'{font}\';'.format(font=font))
if size: