# Path: css2video/outputters/property.py
# def output_property(property_dict):
#     '''Returns the property as a string'''
#     value = output_value(property_dict['property_value'])
#     return '{name}: {value};'.format(
#         name=property_dict['property_name'], value=value)


from .property import output_property


class MissingRuleType(Exception):
    '''Exception raised when the type of rule is not specified'''
    pass


def _output_keyframe_properties(keyframe_dict):
    '''Returns the keyframe properties'''
    properties = '\n\t'.join(
        [output_property(p) for p in keyframe_dict.get('properties', [])])
    return (
        '\t%d%% {\n'
        '\t\t%s\n'
        '\t}'
    ) % (keyframe_dict['selector'], properties)


def output_rule(rule_dict):
    '''Returns the rule as a string'''
    type = rule_dict.get('type')

    if type is None:
        raise MissingRuleType()
    if type == 'style':
        properties = '\n\t'.join(

# Path: css2video/outputters/property.py
# def output_property(property_dict):
#     '''Returns the property as a string'''
#     value = output_value(property_dict['property_value'])
#     return '{name}: {value};'.format(
#         name=property_dict['property_name'], value=value)


# Path: css2video/outputters/rule.py
from .property import output_property



class MissingRuleType(Exception):
    '''Exception raised when the type of rule is not specified'''
    pass


def _output_keyframe_properties(keyframe_dict):
    '''Returns the keyframe properties'''
    properties = '\n\t'.join(
        [output_property(p) for p in keyframe_dict.get('properties', [])])
    return (
        '\t%d%% {\n'
        '\t\t%s\n'
        '\t}'
    ) % (keyframe_dict['selector'], properties)


def output_rule(rule_dict):
    '''Returns the rule as a string'''
    type = rule_dict.get('type')

    if type is None:
        raise MissingRuleType()
    if type == 'style':
        properties = '\n\t'.join(

            [output_property(p) for p in rule_dict.get('properties', [])])