ben-eb / perfectionist

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

Aligning vendor prefixes #79

Open keithjgrant opened 7 years ago

keithjgrant commented 7 years ago

This is another option that should probably get cut. Which way to align vendor prefixes?

.dont-align {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.align {
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
}
keithjgrant commented 7 years ago

I'm in favor of not aligning (i.e. indenting normally). This avoids weird-looking "hanging" declarations beneath:

.wonky {
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    color: green;
}

As @benfrain pointed out, leave it to AutoPrefixer.

jeddy3 commented 7 years ago

As @benfrain pointed out, leave it to AutoPrefixer.

Yes, it seems odd to add a special case to something that most people won't see. Especially when little is gained over the normal property alignment.