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__`.
class_docstr_tok: ["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 _border_style(
      self, style: str | None, width: str | None, color: str | None
  ):
      # convert styles and widths to openxml, one of:
      #       'dashDot'
      #       'dashDotDot'
      #       'dashed'
      #       'dotted'
      #       'double'
      #       'hair'
      #       'medium'
      #       'mediumDashDot'
      #       'mediumDashDotDot'
      #       'mediumDashed'
      #       'slantDashDot'
      #       'thick'
      #       'thin'
      if width is None and style is None and color is None:
          # Return None will remove "border" from style dictionary
          return None
  
      if width is None and style is None:
          # Return "none" will keep "border" in style dictionary
          return "none"
  
      if style in ("none", "hidden"):
          return "none"
  
      width_name = self._get_width_name(width)
      if width_name is None:
          return "none"
  
      if style in (None, "groove", "ridge", "inset", "outset", "solid"):
          # not handled
          return width_name
  
      if style == "double":
          return "double"
      if style == "dotted":
          if width_name in ("hair", "thin"):
              return "dotted"
          return "mediumDashDotDot"
      if style == "dashed":
          if width_name in ("hair", "thin"):
              return "dashed"
          return "mediumDashed"
      elif style in self.BORDER_STYLE_MAP:
          # Excel-specific styles
          return self.BORDER_STYLE_MAP[style]
      else:
          warnings.warn(
              f"Unhandled border style format: {repr(style)}",
              CSSWarning,
              stacklevel=find_stack_level(),
          )
          return "none"
  
imports: from __future__ import annotations
  from functools import lru_cache, reduce
  import itertools
  import re
  from typing import Any, Callable, Hashable, Iterable, Mapping, Sequence, cast
  import warnings
  import numpy
  from pandas._libs.lib import is_list_like
  from pandas._typing import IndexLabel, StorageOptions
  from pandas.util._decorators import doc
  from pandas.util._exceptions import find_stack_level
  from pandas.core.dtypes import missing
  from pandas.core.dtypes.common import is_float, is_scalar
  from pandas import DataFrame, Index, MultiIndex, PeriodIndex
  import pandas.core.common
  from pandas.core.shared_docs import _shared_docs
  from pandas.io.formats._color_data import CSS4_COLORS
  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 9 for calling the CSSToExcelConverter obj's underlying member method code with example usage: obj._border_style(style, width, color) and returns: None, str, str, str, width_name, str, str, str, str, str, self, str