csscomb.js icon indicating copy to clipboard operation
csscomb.js copied to clipboard

Wrong indent

Open npoliquin opened this issue 5 years ago • 2 comments

I made this test and I don't know why scss comb break my scss file like that. Any ideas?

OS: Windows

Consider the following SCSS:

Before:

.class {
	background: red;
	position: absolute;
	margin: 0;
	font: {
		size: 10px;
		weight: 500
	}
	padding: 0;
}

Expected behavior:

.class {
	position: absolute;
	
	padding: 0;
	margin: 0;
	
	font: {
            size: 10px;
	    weight: 500
	}
	
	background: red;
}

After CSSComb:

.class {position: absolute;	margin: 0;		padding: 0;	font: {		size: 10px;		weight: 500	};background: red;	}

Config:

{
    "exclude": [
        ".git/**",
        "node_modules/**",
        "bower_components/**"
    ],
    "space-after-selector-delimiter": "\n",
    "space-after-colon": " ",
    "space-before-opening-brace": 1,
    "strip-spaces": true,
    "block-indent": 4,
    "unitless-zero": true,
    "sort-order": [....],
    "verbose": true,
}

npoliquin avatar Dec 12 '20 18:12 npoliquin

Another issue:

Before:

.container_sliding_search {
            display: none;

            position: absolute;
            top: 85px;
            z-index: 999;

            padding: 20px 15px;

            background-color: #fff;
            box-shadow: 1px 1px 18px rgba(0, 0, 0, 0.42);

            min-height: inherit;
            width: 100%;

            @include ipad-and-below {
                top: 0px;
            }
}

After:

        .container_sliding_search {
position: absolute;

top: 85px;

z-index: 999;

padding: 20px 15px;

width: 100%;

min-height: inherit;

box-shadow: 1px 1px 18px rgba(0, 0, 0, 0.42);

            display: none;

background-color: #fff;

@include ipad-and-below {
                top: 0;
            }

npoliquin avatar Dec 12 '20 18:12 npoliquin

@npoliquin :mad_triggered:

marcdion avatar Nov 30 '22 17:11 marcdion