def split_tokens(rule_tokens, t_type='literal', t_value=';'):
    """Split list of tokens into a list of token lists.

    By a delimiter, the ``rule_tokens`` list is splitted into groups.
    Delimiters are tokens with type ``t_type`` and value ``t_value``.
    Delimiter tokens and ``whitespace`` tokens are stripped from the
    returned lists.

    The default ``t_type`` and ``t_value`` are good to consume a list of
    declarations:

    - https://drafts.csswg.org/css-syntax-3/#consume-a-list-of-declarations

    :param rule_tokens:
        A list of :class:`tinycss.ast.Node`
    :param t_type:
        String with the type of the delimiter token (default=``literal``)
    :param t_value:
        String with the value of the delimiter token (default=``;``)
    :returns: a list of lists with token in (:class:`tinycss.ast.Node`)
    :return: list

    """
    decl_tokens = []
    current = []
    for token in rule_tokens:
        if token.type in ['whitespace']:
            continue
        elif token.type == t_type and token.value == t_value:
            decl_tokens.append(current)
            current = []
        else:
            current.append(token)
    return decl_tokens
