Sublime Forum

CSSComb Only CSS Property Ordering Plugin?

#1

Just a quickie.

I see here that ST has a plugin called CSSComb which reorders all properties of each element alphabetically.

Can someone say definitively if this is the only plugin that offers CSS proprties reordering ?

I ask as, although alphabetical ordering of CSS properties affords detection of duplicates (e.g. display: block; display: flex; ), this type of ordering is not as readable as other methods.

Kevin Powell here advocates a more ‘natural’ ordering in which properties would be organized into bunches separated by a blank line with the bunches ranked according to their impact.

.my-div  { 
        /* Display & Positioning */
        display: ....;
        position: ..........;
        top: ..........;
        bottom: ..........;
        left/right: ......;
        z-index: .......;
        
       /* Box modelling */
        width: ....;
        height: ..........;
        margin: ..........;
        padding: ..........;
        border: ......;
        background: .......;
       
        /* Typography */
        font-family: ....;
        font-size: ..........;
        font-weight: ..........;
        font-style: ..........;
        color: ......;
        background: .......;
        
         /* Manipulation */
        transform: ....;
        animation: ..........;
        filter: ..........;
        opacity: ..........;
        
        /* Miscellaneous */
        border-radius: ...........
        box-shadow: .........
}

Can we take it that no current plugin exists to achieve this ‘natural ordering’ ?

0 Likes

#2

You don’t need to a plugin to reorder properties alphabetically. Sublime Text already does this with Sort, which can be accessed from the command palette like in VS Code.

0 Likes

#3

I was looking for a plugin to order CSS properties as shown in the OP, i.e. the rational order or order of importance.

0 Likes

#4

Here is an easier solution.

0 Likes