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

Need (@else if) and boolean variable support #8

Closed
asifshirazi opened this issue Jul 27, 2015 · 7 comments
Closed

Need (@else if) and boolean variable support #8

asifshirazi opened this issue Jul 27, 2015 · 7 comments

Comments

@asifshirazi
Copy link

I'm converting my sass mixins library into postcss, but not possible yet:

@define-mixin center $horizontal: true, $vertical: true {
    position: absolute;
    @if $horizontal || $vertical {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    } @else if $horizontal {
        left: 50%;
        transform: translate(-50%, 0);
    } @else if $vertical {
        top: 50%;
        transform: translate(0, -50%);
    }
}
@etnlbck
Copy link

etnlbck commented Jul 27, 2015

@asifshirazi I have a pr that will fix this. It has to do with the order in which the processors are called.

@asifshirazi asifshirazi changed the title Need (@if else) and boolean variable support Need (@else if) and boolean variable support Jul 28, 2015
@jonathantneal
Copy link
Collaborator

@etanlubeck were you going to make the PR?

@etnlbck
Copy link

etnlbck commented Sep 7, 2015

I fixed this one in a different PR that we closed

@jonathantneal
Copy link
Collaborator

So we now have @else support? What about boolean?

@etnlbck
Copy link

etnlbck commented Sep 8, 2015

nvm. i just looked at the example. we should re-open this issue. i'll submit a PR this evening after work.

@jonathantneal
Copy link
Collaborator

I think we support @else but not boolean, so did you want to make a PR or shall we close this issue, and you could open one for boolean support?

@jonathantneal
Copy link
Collaborator

We have else support so I am closing this. Feel free to re-open if you find something.

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

3 participants