File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -251,8 +251,12 @@ module.exports = postcss.plugin('postcss-sorting', function (opts) {
251
251
} ) ;
252
252
253
253
// Add last comments in the rule. Need this because last comments are not belonging to anything
254
- rule . each ( function ( node ) {
254
+ rule . each ( function ( node , index ) {
255
255
if ( node . type === 'comment' && ! node . hasOwnProperty ( 'groupIndex' ) && ! node . ruleComment ) {
256
+ node . groupIndex = Infinity ;
257
+ node . propertyIndex = Infinity ;
258
+ node . initialIndex = index ;
259
+
256
260
processed . push ( node ) ;
257
261
}
258
262
} ) ;
Original file line number Diff line number Diff line change 4
4
/* comment 2 */
5
5
/* comment 3 */
6
6
}
7
+ .block {
8
+ position : absolute;
9
+ top : 100% ;
10
+ right : 50% ;
11
+ /* foo 1 */
12
+ /* foo 2 */
13
+ /* foo 3 */
14
+ /* foo 4 */
15
+ /* foo 5 */
16
+ /* foo 6 */
17
+ /* foo 7 */
18
+ /* foo 8 */
19
+ }
Original file line number Diff line number Diff line change 1
1
div {
2
2
display : none;
3
+
3
4
/* comment 1 */
4
5
/* comment 2 */
5
6
/* comment 3 */
6
7
}
8
+ .block {
9
+ position : absolute;
10
+ top : 100% ;
11
+ right : 50% ;
12
+
13
+ /* foo 1 */
14
+ /* foo 2 */
15
+ /* foo 3 */
16
+ /* foo 4 */
17
+ /* foo 5 */
18
+ /* foo 6 */
19
+ /* foo 7 */
20
+ /* foo 8 */
21
+ }
You can’t perform that action at this time.
0 commit comments