class_docstr: A callable for parsing and resolving CSS to atomic properties.
class_docstr_tok: ["A","callable","for","parsing","and","resolving","CSS","to","atomic","properties","."]
docstr: The given declarations to atomic properties.
  
  Parameters
  ----------
  declarations_str : str | Iterable[tuple[str, str]]
      A CSS string or set of CSS declaration tuples
      e.g. "font-weight: bold; background: blue" or
      {("font-weight", "bold"), ("background", "blue")}
  inherited : dict, optional
      Atomic properties indicating the inherited style context in which
      declarations_str is to be resolved. ``inherited`` should already
      be resolved, i.e. valid output of this method.
  
  Returns
  -------
  dict
      Atomic CSS 2.2 properties.
  
  Examples
  --------
  >>> resolve = CSSResolver()
  >>> inherited = {'font-family': 'serif', 'font-weight': 'bold'}
  >>> out = resolve('''
  ...               border-color: BLUE RED;
  ...               font-size: 1em;
  ...               font-size: 2em;
  ...               font-weight: normal;
  ...               font-weight: inherit;
  ...               ''', inherited)
  >>> sorted(out.items())  # doctest: +NORMALIZE_WHITESPACE
  [('border-bottom-color', 'blue'),
   ('border-left-color', 'red'),
   ('border-right-color', 'red'),
   ('border-top-color', 'blue'),
   ('font-family', 'serif'),
   ('font-size', '24pt'),
   ('font-weight', 'bold')]
docstr_tok: ["The","given","declarations","to","atomic","properties",".","Parameters","--","--","--","--","--","declarations_str",":","str","|","Iterable","[","tuple","[","str",",","str","]","]","A","CSS","string","or","set","of","CSS","declaration","tuples","e.g",".","``","font-weight",":","bold",";","background",":","blue","''","or","{","(","``","font-weight","''",",","``","bold","''",")",",","(","``","background","''",",","``","blue","''",")","}","inherited",":","dict",",","optional","Atomic","properties","indicating","the","inherited","style","context","in","which","declarations_str","is","to","be","resolved",".","``","inherited","``","should","already","be","resolved",",","i.e",".","valid","output","of","this","method",".","Returns","--","--","--","-","dict","Atomic","CSS","2.2","properties",".","Examples","--","--","--","--",">",">",">","resolve","=","CSSResolver","(",")",">",">",">","inherited","=","{","'font-family","'",":","'serif","'",",","'font-weight","'",":","'bold","'","}",">",">",">","out","=","resolve","(","``","'","...","border-color",":","BLUE","RED",";","...","font-size",":","1em",";","...","font-size",":","2em",";","...","font-weight",":","normal",";","...","font-weight",":","inherit",";","...","``","'",",","inherited",")",">",">",">","sorted","(","out.items","(",")",")","#","doctest",":","+NORMALIZE_WHITESPACE","[","(","'border-bottom-color","'",",","'blue","'",")",",","(","'border-left-color","'",",","'red","'",")",",","(","'border-right-color","'",",","'red","'",")",",","(","'border-top-color","'",",","'blue","'",")",",","(","'font-family","'",",","'serif","'",")",",","(","'font-size","'",",","'24pt","'",")",",","(","'font-weight","'",",","'bold","'",")","]"]
code: def __call__(
      self,
      declarations: str | Iterable[tuple[str, str]],
      inherited: dict[str, str] | None = None,
  ) -> dict[str, str]:
      """
      The given declarations to atomic properties.
  
      Parameters
      ----------
      declarations_str : str | Iterable[tuple[str, str]]
          A CSS string or set of CSS declaration tuples
          e.g. "font-weight: bold; background: blue" or
          {("font-weight", "bold"), ("background", "blue")}
      inherited : dict, optional
          Atomic properties indicating the inherited style context in which
          declarations_str is to be resolved. ``inherited`` should already
          be resolved, i.e. valid output of this method.
  
      Returns
      -------
      dict
          Atomic CSS 2.2 properties.
  
      Examples
      --------
      >>> resolve = CSSResolver()
      >>> inherited = {'font-family': 'serif', 'font-weight': 'bold'}
      >>> out = resolve('''
      ...               border-color: BLUE RED;
      ...               font-size: 1em;
      ...               font-size: 2em;
      ...               font-weight: normal;
      ...               font-weight: inherit;
      ...               ''', inherited)
      >>> sorted(out.items())  # doctest: +NORMALIZE_WHITESPACE
      [('border-bottom-color', 'blue'),
       ('border-left-color', 'red'),
       ('border-right-color', 'red'),
       ('border-top-color', 'blue'),
       ('font-family', 'serif'),
       ('font-size', '24pt'),
       ('font-weight', 'bold')]
      """
      if isinstance(declarations, str):
          declarations = self.parse(declarations)
      props = dict(self.atomize(declarations))
      if inherited is None:
          inherited = {}
  
      props = self._update_initial(props, inherited)
      props = self._update_font_size(props, inherited)
      return self._update_other_units(props)
  
file_path: catboost/contrib/python/pandas/py3/pandas/io/formats/css.py
imports: from __future__ import annotations
  import re
  from typing import Callable, Generator, Iterable, Iterator
  import warnings
  from pandas.errors import CSSWarning
  from pandas.util._exceptions import find_stack_level
label_desc: Use image node_id 1 for calling the CSSResolver obj's underlying member method code with example usage: obj.__call__(declarations, inherited) and returns: self