Skip to content

Commit

Permalink
Use inherited font size for em_pt
Browse files Browse the repository at this point in the history
  • Loading branch information
jnothman committed Apr 5, 2017
1 parent 8780076 commit 0ce72f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pandas/formats/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,6 @@ def __init__(self, inherited=None):
self.inherited = inherited

INITIAL_STYLE = {
'font-size': '12pt'
}

def __call__(self, declarations_str):
Expand Down Expand Up @@ -2022,9 +2021,10 @@ def compute_css(cls, declarations_str, inherited=None):

# 2. resolve relative font size
if props.get('font-size'):
em_pt = self.INITIAL_STYLE['font-size']
assert em_pt[-2:] == 'pt'
em_pt = float(em_pt[:-2])
if 'font-size' in inherited:
em_pt = inherited['font-size']
assert em_pt[-2:] == 'pt'
em_pt = float(em_pt[:-2])
font_size = self.font_size_to_pt(props['font-size'], em_pt)
props['font-size'] = '%fpt' % font_size

Expand Down

0 comments on commit 0ce72f9

Please sign in to comment.