def __call__(self, declarations_str, inherited=None):
props = dict(self.atomize(self.parse(declarations_str)))<EOL>if inherited is None:<EOL><INDENT>inherited = {}<EOL><DEDENT>for prop, val in inherited.items():<EOL><INDENT>if prop not in props:<EOL><INDENT>props[prop] = val<EOL><DEDENT><DEDENT>for prop, val in list(props.items()):<EOL><INDENT>if val == '<STR_LIT>':<EOL><INDENT>val = inherited.get(prop, '<STR_LIT>')<EOL><DEDENT>if val == '<STR_LIT>':<EOL><INDENT>val = None<EOL><DEDENT>if val is None:<EOL><INDENT>del props[prop]<EOL><DEDENT>else:<EOL><INDENT>props[prop] = val<EOL><DEDENT><DEDENT>if props.get('<STR_LIT>'):<EOL><INDENT>if '<STR_LIT>' in inherited:<EOL><INDENT>em_pt = inherited['<STR_LIT>']<EOL>assert em_pt[-<NUM_LIT:2>:] == '<STR_LIT>'<EOL>em_pt = float(em_pt[:-<NUM_LIT:2>])<EOL><DEDENT>else:<EOL><INDENT>em_pt = None<EOL><DEDENT>props['<STR_LIT>'] = self.size_to_pt(<EOL>props['<STR_LIT>'], em_pt, conversions=self.FONT_SIZE_RATIOS)<EOL>font_size = float(props['<STR_LIT>'][:-<NUM_LIT:2>])<EOL><DEDENT>else:<EOL><INDENT>font_size = None<EOL><DEDENT>for side in self.SIDES:<EOL><INDENT>prop = '<STR_LIT>'.format(side=side)<EOL>if prop in props:<EOL><INDENT>props[prop] = self.size_to_pt(<EOL>props[prop], em_pt=font_size,<EOL>conversions=self.BORDER_WIDTH_RATIOS)<EOL><DEDENT>for prop in ['<STR_LIT>'.format(side=side),<EOL>'<STR_LIT>'.format(side=side)]:<EOL><INDENT>if prop in props:<EOL><INDENT>props[prop] = self.size_to_pt(<EOL>props[prop], em_pt=font_size,<EOL>conversions=self.MARGIN_RATIOS)<EOL><DEDENT><DEDENT><DEDENT>return props<EOL>
the given declarations to atomic properties

        Parameters
        ----------
        declarations_str : str
            A list of CSS declarations
        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
        -------
        props : 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')]