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

Wrong formatting #56

Closed
iamvdo opened this issue Jun 24, 2014 · 4 comments
Closed

Wrong formatting #56

iamvdo opened this issue Jun 24, 2014 · 4 comments

Comments

@iamvdo
Copy link
Contributor

iamvdo commented Jun 24, 2014

There's a difference between 0.3.4 and 1.0.0 with formatting:

For example, this code:

:root {
    --width    :50px;
}

body {
    display: flex;
    order: 2;
}

Postcss0.3.4:

:root {
    --width    :50px;
}

body {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-ordinal-group: 3;
    -webkit-order: 2;
        -ms-flex-order: 2;
            order: 2;
}

Postcss1.0.0:

:root {
    --width    :50px;
}

body {
    display    :-webkit-box;
    display    :-webkit-flex;
    display    :-ms-flexbox;
    display: flex;
    -webkit-box-ordinal-group    :3;
    -webkit-order    :2;
        -ms-flex-order    :2;
            order: 2;
}

The first "pattern" found is kept all the time.

@ai
Copy link
Member

ai commented Jun 24, 2014

:D. Yeap, this is current logic. But why you write --width :50px;?

Maybe:

:root {
    --width:          50px;
    --the-long-width: 50px;
}

@ai
Copy link
Member

ai commented Jun 24, 2014

But anyway I try to find some solution in Autoprefixer and PostCSS for this situation.

@iamvdo
Copy link
Contributor Author

iamvdo commented Jun 24, 2014

Yes absolutely this (edge) case ;)

@ai
Copy link
Member

ai commented Jun 25, 2014

Fixed in Autoprefixer 6e1785655e08948cbd5febafeca2743683452982

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