Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong indent #638

Open
npoliquin opened this issue Dec 12, 2020 · 2 comments
Open

Wrong indent #638

npoliquin opened this issue Dec 12, 2020 · 2 comments

Comments

@npoliquin
Copy link

npoliquin commented Dec 12, 2020

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 npoliquin reopened this Dec 12, 2020
@npoliquin
Copy link
Author

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;
            }

@marcdion
Copy link

@npoliquin :mad_triggered:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants