badsyntax / SassBeautify

[not maintained] A Sublime Text plugin that beautifies Sass files.
https://github.com/badsyntax/SassBeautify
MIT License
143 stars 13 forks source link

Leading zero #110

Open Ulrikop opened 8 years ago

Ulrikop commented 8 years ago

Hi, I use the rule Leading Zero with "exclude_zero". So I want to write .5 for 0.5.

But the beautifier breaks that rule, because it adds the 0. Can I configure that behavior? It would be nice, if it removes an zero if one is there.

If the beautifier doesn't support it yet, could you add it?

Thank you.

owenleonard commented 8 years ago

I've been looking into this because I ran into the same issue. I'm not seeing it happen in every case, though. For example, with this snippet

h1 {
    margin: .4em;
    -webkit-transform: scale(.9);
    transition: -webkit-transform .1s;
}

It gets transformed to

h1 {
    margin: .4em;
    -webkit-transform: scale(0.9);
    transition: -webkit-transform .1s;
}

Notice that the middle line -webkit-transform is the only one that gets the 0 added on. Not sure why that is...