Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser fails on inline @media blocks #12

Open
jehiah opened this issue May 28, 2011 · 6 comments
Open

parser fails on inline @media blocks #12

jehiah opened this issue May 28, 2011 · 6 comments
Labels

Comments

@jehiah
Copy link

jehiah commented May 28, 2011

The parser fails on

@media screen and (max-width: 1025px) {
  #block .link {
    position: relative;
  }
}

with the following error

RuntimeError: invalid transition from <CSSParseState handler=<bound method CSSParser._handle_declaration of <spritecss.css.parser.CSSParser object at 0xaf86d10>>, prev=None, counter=3, tokens=<generator object _css_tokenizer_lineno at 0xaf79aa0>, token=Token('block_begin', '{', line_no=2, col_no=16), selector='', declaration='#block .link ', at_rule='', comment='', whitespace=''>

@MatthewCallis
Copy link

I can confirm this :/ , simple work around by splitting it up.

@toabi
Copy link

toabi commented Jun 29, 2011

I can confirm this too. It sucks a bit ¬_¬ But well… working around that now with splitting stuff up.

@marioestrada
Copy link

Yep this sucks big time, has any body found a workaround?

@shivmitra
Copy link

I have a @media query like this -

@media (min-height: 768px) {
div #siteLogo {
position: absolute;
left: 50%;
background: url('../../images/logo.png');
}
.logo_container {
height: 77px;
}
}

It fails with following error -
RuntimeError: invalid transition from <CSSParseState handler=<bound method CSSPa
rser._handle_declaration of <spritecss.css.parser.CSSParser object at 0x028693B0

, prev=None, counter=119, tokens=<generator object _css_tokenizer_lineno at 0x
02866C60>, token=Token('block_begin', '{', line_no=62, col_no=17), selector='',
declaration='div #siteLogo ', at_rule='', comment='', whitespace=''>

What is the workaround this ? When we can expect a fix ?

@chasehensel
Copy link

It'd be great if someone would fix this :) It's blocking me from using spritemapper

@jakenoble
Copy link

Fix please 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants