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

_headers() overwrites passed parameters #60

Closed
alexdante opened this issue Mar 30, 2012 · 2 comments
Closed

_headers() overwrites passed parameters #60

alexdante opened this issue Mar 30, 2012 · 2 comments
Milestone

Comments

@alexdante
Copy link

I'm using the headings() function like so:

#{headings(4)} {
    background-color: rgb(100,100,100);
}

According to the Compass docs, this should generate rules for h1 through h4, but instead I get:

h1 {
    background-color: #646464;
}

The error seems to be in __init__.py:_headers:

if isinstance(frm, StringValue) and frm.value.lower() == 'all':
    frm = 1
    to = 6
else:
    frm = 1
    try:
        to = int(getattr(frm, 'value', frm))
    except ValueError:
        to = 6

The assignment of 1 to frm before the try block that assigns to seems to be the problem. It needs to be assigned after to has been determined from it (so after the try block).

@alexdante
Copy link
Author

I've forked and fixed the issue here: https://github.com/alexdante/pyScss

@eevee
Copy link
Collaborator

eevee commented Aug 9, 2013

Fixed!

@eevee eevee closed this as completed Aug 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants