Сортировка CSS свойств

Инструмент для пересортировки CSS свойств в заданном порядке.

Что сейчас:

Планы

  1. Доработки связанные с тест кейсами, которые не парсятся или плохо парсятся
  2. Переезд на csscomb.ru
  3. Разработка плагинов для популярных редакторов кода

Порядок сортировки по умолчанию

Порядок свойств взят из документации к Zen coding.

  1. position
  2. top
  3. right
  4. bottom
  5. left
  6. z-index
  7. float
  8. clear
  9. display
  10. visibility
  11. overflow
  12. overflow-x
  13. overflow-y
  14. overflow-style
  15. zoom
  16. clip
  17. box-sizing
  18. box-shadow
  19. -webkit-box-shadow
  20. -moz-box-shadow
  21. margin
  22. margin-top
  23. margin-right
  24. margin-bottom
  25. margin-left
  26. padding
  27. padding-top
  28. padding-right
  29. padding-bottom
  30. padding-left
  31. width
  32. height
  33. max-width
  34. max-height
  35. min-width
  36. min-height
  37. outline
  38. outline-offset
  39. outline-width
  40. outline-style
  41. outline-color
  42. border
  43. border-break
  44. border-collapse
  45. border-color
  46. border-image
  47. -webkit-border-image
  48. -moz-border-image
  49. border-top-image
  50. border-right-image
  51. border-bottom-image
  52. border-left-image
  53. border-corner-image
  54. border-top-left-image
  55. border-top-right-image
  56. border-bottom-right-image
  57. border-bottom-left-image
  58. border-fit
  59. border-length
  60. border-spacing
  61. border-style
  62. border-width
  63. border-top
  64. border-top-width
  65. border-top-style
  66. border-top-color
  67. border-right
  68. border-right-width
  69. border-right-style
  70. border-right-color
  71. border-bottom
  72. border-bottom-width
  73. border-bottom-style
  74. border-bottom-color
  75. border-left
  76. border-left-width
  77. border-left-style
  78. border-left-color
  79. -webkit-border-radius
  80. -moz-border-radius
  81. -khtml-border-radius
  82. border-radius
  83. border-top-right-radius
  84. border-top-left-radius
  85. border-bottom-right-radius
  86. border-bottom-left-radius
  87. background
  88. filter:progid:DXImageTransform.Microsoft.AlphaImageLoader
  89. background-color
  90. background-image
  91. background-repeat
  92. background-attachment
  93. background-position
  94. background-position-x
  95. background-position-y
  96. background-break
  97. background-clip
  98. background-origin
  99. background-size
  100. color
  101. table-layout
  102. caption-side
  103. empty-cells
  104. list-style
  105. list-style-position
  106. list-style-type
  107. list-style-image
  108. quotes
  109. content
  110. counter-increment
  111. counter-reset
  112. vertical-align
  113. text-align
  114. text-align-last
  115. text-decoration
  116. text-emphasis
  117. text-height
  118. text-indent
  119. text-justify
  120. text-outline
  121. text-replace
  122. text-transform
  123. text-wrap
  124. text-shadow
  125. line-height
  126. white-space
  127. white-space-collapse
  128. word-break
  129. word-spacing
  130. word-wrap
  131. letter-spacing
  132. font
  133. font-weight
  134. font-style
  135. font-variant
  136. font-size
  137. font-size-adjust
  138. font-family
  139. font-effect
  140. font-emphasize
  141. font-emphasize-position
  142. font-emphasize-style
  143. font-smooth
  144. font-stretch
  145. opacity
  146. filter:progid:DXImageTransform.Microsoft.Alpha(Opacity
  147. -ms-filter:'progid:DXImageTransform.Microsoft.Alpha
  148. transitions
  149. resize
  150. cursor
  151. page-break-before
  152. page-break-inside
  153. page-break-after
  154. orphans
  155. widows

Примеры успешно пройденных тест кейсов

  1. div {
    	margin-top: 1px;
    	top: 1px;
    	background-position: 0 0;
    	padding: 10px;
    	position: relative;
    }
  2. /* Стили
    для
    fieldset */
    
    fieldset
    {
    	padding: 0;
    	border: 0;
    	margin: 0 0 16px;
    	}
  3. div {
    	right: 10px !important;
    	border-right-width: 1px;
    	width: 100px;
    }
  4. div {
    	width: 10px;
    	height: 10px;
    }
    
    	div a {
    		background: url(/i/ico.gif);
    	}
  5. div{
    	color: red;
    	*color: green;
    	_color: yellow;
    	co\lor: black;
    }
  6. div {
    	height: 100px;
    	opacity:/* Этот комментарий будет удален */1;
    	/* И этот комментарий будет удален */ text-indent:-9999px;
    	font-family:'Monotype Corsiva','Comic Sans MS',cursive; /* Этот будет тоже удален */
    }
  7. a{
    	background: red;
    	background: green;
    	/* position: absolute; */
    	}
  8. #footer .copyright {
    	/*
    	width: 177px;
    	float: right;
    	margin-top: 5px;
    	line-height: 12px;
    	font-size: 93%;
    	background: red;
    	*/
    }
  9. div {display: inline-block; *display: inline;}
  10. .test-class {margin:0}
  11. div {
    	background: red;
    	filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
    	opacity: 1;
    	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/i/pic1.png',sizingMethod='crop');
    }
  12. /* .b-news (begin) */
    .b-news
    {
       top: 0;
       position: relative;
    }
    /* .b-news (end) */
  13. .b-pager{font-size:130%;margin:1em 0 2em;}
    .b-pager__title{font-weight:bold;padding-right:.65em;}
  14. /* .b-pager (begin) */
    .b-pager{font-size:130%;margin:1em 0 2em;}
    .b-pager__title{font-weight:bold;padding-right:.65em;}
    /* .b-pager (end) */
    
  15. #header {
    	zoom:1;
    	zoom:expression(
    		runtimeStyle.zoom = 1,
    		i = createElement('div'),
    		i.className = 'after',
    		appendChild(i)
    		);
    	padding-bottom:10px;
    	height:100px;
    	height:expression(
    		runtimeStyle.height = 1,
    		this.parentNode.style.offsetHeight;
    		);
    	}
  16. /* test */
    @media screen { /* Стиль для отображения в браузере */
    	BODY {
    		font-family: Arial, Verdana, sans-serif; /* Рубленый шрифт */
    		font-size: 90%; /* Размер шрифта */
    		color: #000080; /* Цвет текста */
    	}
    
    	H1 {
    		background: #faf0e6; /* Цвет фона под текстом */
    		border: 2px dashed #800000; /* Рамка вокруг заголовка */
    		color: #a0522d; /* Цвет текста */
    		padding: 7px; /* Поля вокруг текста */
    	}
    
    	H2 {
    		color: #556b2f; /* Цвет текста */
    		margin: 0; /* Убираем отступы */
    	}
    
    	P {
    		margin-top: 0.5em; /* Отступ сверху */
    	}
    
    }
    
    /* test */
    @media print { /* Стиль для печати */
    
    	BODY {
    		font-family: Times, 'Times New Roman', serif; /* Шрифт с засечками */
    	}
    
    	H1, H2, P {
    		color: #000; /* Черный цвет текста */
    	}
    
    }
    /* test */
  17. aside {
    	background: url(a.png) top left no-repeat,
    				url(b.png) center / 100% 100% no-repeat,
    				url(c.png) white;
    
    }
  18. @font-face {
    	font-family: MyHelvetica;
    	src: local("Helvetica Neue Bold"),
    		 local("HelveticaNeue-Bold"),
    		 url(MgOpenModernaBold.ttf);
    	font-weight: bold;
    }
    /* http://www.w3.org/TR/css3-fonts/#font-resources */
  19. div
    {
    	display:-moz-inline-box;
    	display:inline-block;
    }
    
    a
    {
    	cursor:pointer;
    	cursor:hand;
    }
  20. /* @media print { */
    *
    {
        background: #fff !important;
        color: #000;
    }
    
    body
    {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.4;
        word-spacing: 1.1pt;
        letter-spacing: 0.2pt;
        font-family: Georgia, Garamond, "Times New Roman", Times, serif !important;
        color: #000 !important;
        background: #fff;
        font-size: 12pt;
    }
    
    /*Headings */
    h1, h2, h3, h4, h5, h6
    {
        font-family: Helvetica, Arial, sans-serif;
        color: #000000 !important;
    }
    
    
    blockquote
    {
        margin: 1.3em;
        padding: 1em;
        font-size: 10pt;
        font-style: italic;
    }
    
    /* Images */
    a img
    {
        border: none;
    }
    
    /* code */
    code, pre
    {
        color: #000
    }
    
    /* Links */
    a:link, a:visited
    {
        background: transparent;
        text-decoration: underline;
        color: #000 !important;
    }
    
    a[href^="http://"]
    {
        color: #000;
    }
    
    
    /*}*/
    
  21. .b-chooser__body__bg
    {
        padding: 1em 0 3em 0; /* comment */
    }
  22. .b-chooser__body__bg
    {
        padding: 1em 0 3em 0;
        background: url(b-chooser__tank.png) 94% 100% no-repeat;
    }
    /* привет */ /* */
  23. div{
    top:0;margin:0;}
  24. /* Article List */
    .article-list {
        }
            .article-list .archive-item {
                }
  25. .test{
    	text-shadow:
    		0 -1px 1px rgba(0,0,0,0.4),
    		0 0 5px rgba(255,255,255,0.7);
    }

Обнаруженные баги

Известных багов не обнаружено. Если вы нашли баг, пожалуйста, .