class_docstr: A callable for converting CSS declarations to ExcelWriter styles
  
  Supports parts of CSS 2.2, with minimal CSS 3.0 support (e.g. text-shadow),
  focusing on font styling, backgrounds, borders and alignment.
  
  Operates by first computing CSS styles in a fairly generic
  way (see :meth:`compute_css`) then determining Excel style
  properties from CSS properties (see :meth:`build_xlstyle`).
  
  Parameters
  ----------
  inherited : str, optional
      CSS declarations understood to be the containing scope for the
      CSS processed by :meth:`__call__`.
code: def build_font(self, props):
      size = props.get("font-size")
      if size is not None:
          assert size.endswith("pt")
          size = float(size[:-2])
  
      font_names_tmp = re.findall(
          r"""(?x)
              (
              "(?:[^"]|\\")+"
              |
              '(?:[^']|\\')+'
              |
              [^'",]+
              )(?=,|\s*$)
          """,
          props.get("font-family", ""),
      )
      font_names = []
      for name in font_names_tmp:
          if name[:1] == '"':
              name = name[1:-1].replace('\\"', '"')
          elif name[:1] == "'":
              name = name[1:-1].replace("\\'", "'")
          else:
              name = name.strip()
          if name:
              font_names.append(name)
  
      family = None
      for name in font_names:
          if name == "serif":
              family = 1  # roman
              break
          elif name == "sans-serif":
              family = 2  # swiss
              break
          elif name == "cursive":
              family = 4  # script
              break
          elif name == "fantasy":
              family = 5  # decorative
              break
  
      decoration = props.get("text-decoration")
      if decoration is not None:
          decoration = decoration.split()
      else:
          decoration = ()
  
      return {
          "name": font_names[0] if font_names else None,
          "family": family,
          "size": size,
          "bold": self.BOLD_MAP.get(props.get("font-weight")),
          "italic": self.ITALIC_MAP.get(props.get("font-style")),
          "underline": (
              "single" if "underline" in decoration else None
          ),
          "strike": ("line-through" in decoration) or None,
          "color": self.color_to_excel(props.get("color")),
          # shadow if nonzero digit before shadow color
          "shadow": (
              bool(re.search("^[^#(]*[1-9]", props["text-shadow"]))
              if "text-shadow" in props
              else None
          ),
          # 'vertAlign':,
          # 'charset': ,
          # 'scheme': ,
          # 'outline': ,
          # 'condense': ,
      }
  
imports: import itertools
  import re
  import warnings
  import numpy
  from pandas.compat import reduce
  from pandas.core.dtypes import missing
  from pandas.core.dtypes.common import is_float, is_scalar
  from pandas.core.dtypes.generic import ABCMultiIndex, ABCPeriodIndex
  from pandas import Index
  import pandas.core.common
  from pandas.io.formats.css import CSSResolver, CSSWarning
  from pandas.io.formats.format import get_level_lengths
  from pandas.io.formats.printing import pprint_thing
label_desc: Use image node_id 8 for calling the CSSToExcelConverter obj's underlying member method code with example usage: obj.build_font(props) and returns: dict