'For CSS 2.1, parse a list of media types.
Media Queries are expected to override this.
:param tokens:
A list of tokens
:raises:
:class:`~.parsing.ParseError` on invalid media types/queries
:returns:
For CSS 2.1, a list of media types as strings'

def parse_media(self, tokens, errors):

    if (not tokens):
        return [u'all']
    media_types = []
    for part in split_on_comma(remove_whitespace(tokens)):
        types = [token.type for token in part]
        if (types == [u'IDENT']):
            media_types.append(part[0].value)
        else:
            raise ParseError(tokens[0], (u'expected    a    media    type' + ((u',    got    ' + u',    '.join(types)) if types else u'')))
    return media_types
