There's a tool that can arrange attributes in css in order

79 0

Sometimes there's no logic to write css, and there's a tool that can put a css file in each class or id in a fixed order, such as 1, width; 2, height; 3, float; Wait, I should describe it.

2 Answers

109 5

It seems like there's no specified order, but there are many versions of the internet, which is the order I've often used.

The following table counts from top to bottom, from left to right:
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = equals = = = = = = = = = = = = = = = = = = = = =
Display | | visibility
List-style: list-style-type | | list-style-position | | list-style-image
position
Top | | right | | bottom | | left
Z-index
clear
float

width
Max-width | | min-width
height
Max-height | | min-height
Overflow | | clip
Margin: margin-top | | margin-right | | margin-bottom | | margin-left
Padding: padding-top | | padding-right | | padding-bottom | | padding-left
Outline: outline-color | | outline-style | | outline-width
border
Background: background-color | | background-image | | background-repeat | | background-attachment | background-position

color
Font: font-style | | font-variant | | font-weight | | font-size | |
Font: caption | icon | menu message-box | small-caption | status-bar
Text-overflow
Text-align
Text-indent
Line-height
White-space
Vertical-align
cursor
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = equals = = = = = = = = = = = = = = = = = = = = =
It's a summary of tencent ghost, http://www, cssforest, org/blog/index, p, and.
And the following mergecss tools are.

Related work has CSSTidy, css compressor, minify, mergecss, yui compressor and tb compressor.
http://csstidy. Sourceforge. Net/.
http://www. Csscompressor. Com/.
http://www. Cssforest. org/blog/index. P..
http://www. Cssoptimiser. Com/.
http://www. Cssdrive. Com/index. Php/mai..

124 3

Both CSSTidy or cleancss provide property sorting
But I haven't seen a custom order yet.

...