DEV Community

Discussion on: CSS Alphabetize plugin for VSCode

Collapse
 
codinghusi profile image
Gerrit Weiermann

Oh that's an very interesting approach!

"Small" suggestion: it could groupsproperties by logic, not by the lexicographic order, although this would mean much more work to work out all those categories and order :)

Collapse
 
mattkenefick profile image
Matt Kenefick

Thanks for the feedback.

If I'm understanding you correctly, the explicit purpose of this plugin is to ignore an individual's logic and very specifically depend only on standardized lexicographic order (alphabetization).

The problem with grouping by logic is agreeing on order of those subgroups and which properties belong with which group.

Does "color" belong with "font" styles? Which group should "background-color" be in? Do "text-transform" and "text-align" go with "font" because they're related to typography? What do we do with properties that have only one item in their "subgroup"?

The simplest and cleanest way of knowing which properties exist in a block is sorting it alphabetically. Looking for "position"? Search for "P".