Changeset 3046:635ba2f89c42 in livinglogic.python.xist

Show
Ignore:
Timestamp:
11/30/07 16:24:37 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Adapt to cssutils 0.9.4a3, which implements media lists diffently. Remove debug prints.

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/css.py

    r3045 r3046  
    5252    while stylesheet is not None: 
    5353        if stylesheet.media is not None: 
    54             # FIXME: remove extensions: see http://www.w3.org/TR/css3-mediaqueries/#idx-media-descriptor-1 
    55             return stylesheet.media 
     54            return set(mq.mediaType for mq in stylesheet.media) 
    5655        stylesheet = stylesheet.parentStyleSheet 
    5756    return None 
     
    8180                    yield rule 
    8281            elif rule.type == css.CSSRule.MEDIA_RULE: 
    83                 if wantmedia in rule.media: 
     82                if wantmedia in (mq.mediaType for mq in rule.media): 
    8483                    for subrule in rule.cssRules: 
    8584                        yield subrule 
  • test/test_css.py

    r2903 r3046  
    100100        with html.body(): 
    101101            +html.p("gurk") 
    102  
    103     css.applystylesheets(e) 
     102    print e.bytes() 
     103 
     104    css.applystylesheets(e) 
     105 
     106    print e.bytes() 
    104107 
    105108    assert str(e.walknode(html.p)[0].attrs.style) == "color: red;"