ben-eb / perfectionist

Beautify CSS files.
MIT License
229 stars 14 forks source link

Add `maxValueLength` #5

Closed Justineo closed 8 years ago

Justineo commented 8 years ago

Like maxSelectorLength, to split value over multiple lines only if its length exceeds the specified limit.

I got results seemed weird now:

.x {
    transition-duration: 0.5s,
                         2s;
}

The following format seems prettier:

.x {
    transition-duration: 0.5s, 2s;
}
ben-eb commented 8 years ago

Makes sense. The logic for the maxSelectorLength needs a bit of cleaning up, so will do https://github.com/ben-eb/perfectionist/issues/1 at the same time.

Justineo commented 8 years ago

By the way, I'm using perfectionist to generate formatted code showcase for my Less mixin library est and it works quite nicely now :)

ben-eb commented 8 years ago

Nice! :+1: