def computed_from_cascaded(element, cascaded, parent_style, pseudo_type=None,
                           root_style=None, base_url=None,
                           target_collector=None):
    """Get a dict of computed style mixed from parent and cascaded styles."""
    if not cascaded and parent_style is not None:
        return AnonymousStyle(parent_style)

    style = ComputedStyle(
        parent_style, cascaded, element, pseudo_type, root_style, base_url)
    if target_collector and style['anchor']:
        target_collector.collect_anchor(style['anchor'])
    return style
Get a dict of computed style mixed from parent and cascaded styles.
weasyprint/css/__init__.py