Skip to content

Commit d339c5d

Browse files
committed
Instead of animated GIF, use before/after image instead. And screenshot path fixed
1 parent 47c6180 commit d339c5d

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

README.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
# com-css-sort #
22

3-
com-css-sort stands for Common CSS Sorting. The goal of this project
3+
com-css-sort stands for Common CSS Sorting. The goal of this project
44
is to provide a basic way of sorting CSS attributes.<br/><br/>
55

66

77
## How to use? ##
88

99
### Alphabetic Order ###
10-
1. Just set `com-css-sort-sort-type` to 1.
10+
1. Just set `com-css-sort-sort-type` to 1.
1111

1212
### Customize Order Your Own ###
13-
1. Create `sort-order.ccs` file at the version control root directory.
14-
You can grab a ccs file from `./ccs_examples/` directory in this repository.
15-
2. Look at the .ccs file, the order in the file will be the order that
13+
1. Create `sort-order.ccs` file at the version control root directory.
14+
You can grab a ccs file from `./ccs_examples/` directory in this repository.
15+
2. Look at the .ccs file, the order in the file will be the order that
1616
the CSS attributes will be sorted.
1717

1818

1919
## Configuration ##
2020
Type of sorting algorithm you want used when sorting CSS attributes.<br/>
21-
* 0 : Sort in group type. Use 'sort-order.ccs' if
21+
* 0 : Sort in group type. Use 'sort-order.ccs' if
2222
there is one in the version control root directory. (Default)<br/>
23-
* 1 : Sort in alphabetic order. The 'sort-order.ccs'
23+
* 1 : Sort in alphabetic order. The 'sort-order.ccs'
2424
file will be ignore and will not do anything.<br/>
2525
```
2626
(setq com-css-sort-sort-type 0)
2727
```
2828

29-
If you don't like the path or file name, you can change it too. This variable is
29+
If you don't like the path or file name, you can change it too. This variable is
3030
relative path to version control root directory.
3131
```
3232
(setq com-css-sort-sort-file "sort-order.ccs")
3333
```
3434

35-
Customize your own sorting order programmatically. If you do not have the
35+
Customize your own sorting order programmatically. If you do not have the
3636
`sort-order.ccs' file in the version control root directory then this will be use!
3737
```
38-
(setq com-css-sort-default-attributes-order '("display" "position" "top" "right" "bottom" "left" "float" "clear"
38+
(setq com-css-sort-default-attributes-order '("display" "position" "top" "right" "bottom" "left" "float" "clear"
3939
"visibility" "opacity" "z-index" "margin" "margin-top" "margin-right" "margin-bottom" "margin-left" "outline"
40-
"border" "border-top" "border-right" "border-bottom" "border-left" "border-width" "border-top-width"
41-
"border-right-width" "border-bottom-width" "border-left-width" "border-style" "border-top-style"
42-
"border-right-style" "border-bottom-style" "border-left-style" "border-color" "border-top-color"
43-
"border-right-color" "border-bottom-color" "border-left-color" "background" "background-color" "background-image"
44-
"background-repeat" "background-position" "cursor" "padding" "padding-top" "padding-right" "padding-bottom"
45-
"padding-left" "width" "min-width" "max-width" "height" "min-height" "max-height" "overflow" "list-style"
46-
"caption-side" "table-layout" "border-collapse" "border-spacing" "empty-cells" "vertical-align" "text-align"
47-
"text-indent" "text-transform" "text-decoration" "line-height" "word-spacing" "letter-spacing" "white-space"
40+
"border" "border-top" "border-right" "border-bottom" "border-left" "border-width" "border-top-width"
41+
"border-right-width" "border-bottom-width" "border-left-width" "border-style" "border-top-style"
42+
"border-right-style" "border-bottom-style" "border-left-style" "border-color" "border-top-color"
43+
"border-right-color" "border-bottom-color" "border-left-color" "background" "background-color" "background-image"
44+
"background-repeat" "background-position" "cursor" "padding" "padding-top" "padding-right" "padding-bottom"
45+
"padding-left" "width" "min-width" "max-width" "height" "min-height" "max-height" "overflow" "list-style"
46+
"caption-side" "table-layout" "border-collapse" "border-spacing" "empty-cells" "vertical-align" "text-align"
47+
"text-indent" "text-transform" "text-decoration" "line-height" "word-spacing" "letter-spacing" "white-space"
4848
"color" "font" "font-family" "font-size" "font-weight" "content" "quotes"))
4949
```
5050

@@ -53,14 +53,19 @@ Customize your own sorting order programmatically. If you do not have the
5353
Just bind the key if to whatever you feel comfortable with.
5454
```
5555
;; Sort attributes inside block.
56-
(define-key css-mode-map "\C-ks" 'com-css-sort-attributes-block)
56+
(define-key css-mode-map (kbd "C-k s") #'com-css-sort-attributes-block)
5757
5858
;; Sort attributes through the whole document.
59-
(define-key css-mode-map "\C-kd" 'com-css-sort-attributes-document)
59+
(define-key css-mode-map (kbd "C-k d") #'com-css-sort-attributes-document)
6060
```
6161

6262
## Screen Shot ##
63-
<img src="./screen_shot/com_css_sort_demo1.gif"/>
63+
Before Sotring
64+
<img src="./screenshot/com-css-sort-before.png"/>
65+
Type Sorting
66+
<img src="./screenshot/com-css-sort-type-sort.png"/>
67+
Alphabetic Sorting
68+
<img src="./screenshot/com-css-sort-alphabetic-sort.png"/>
6469

6570

6671
## Contribution ##

0 commit comments

Comments
 (0)