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

Output has rogue spaces #10

Closed
mdo opened this issue Dec 9, 2013 · 2 comments
Closed

Output has rogue spaces #10

mdo opened this issue Dec 9, 2013 · 2 comments

Comments

@mdo
Copy link

mdo commented Dec 9, 2013

Using raw grunt-contrib-less, I get this diff on Bootstrap:

 sub,
 sup {
-  position: relative;
   font-size: 75%;
   line-height: 0;
+  position: relative;
   vertical-align: baseline;
 }

With grunt-csscomb, I get some rogue spaces:

 sub,
 sup {
-  position: relative;
   font-size: 75%;
   line-height: 0;
+
+  position: relative;
+
   vertical-align: baseline;
 }

Things get even worse with media queries (there are no changes in the default LESS compilation task):

 @media print {
-  * {
+    * {
     color: #000 !important;
-    text-shadow: none !important;
     background: transparent !important;
     box-shadow: none !important;
-  }
-  a,
+    text-shadow: none !important;
+    }
+    a,
   a:visited {
     text-decoration: underline;
-  }
-  a[href]:after {
+    }
+    a[href]:after {
     content: " (" attr(href) ")";
-  }
-  abbr[title]:after {
+    }
+    abbr[title]:after {
     content: " (" attr(title) ")";
-  }
-  a[href^="javascript:"]:after,
+    }
+    a[href^="javascript:"]:after,
   a[href^="#"]:after {
     content: "";
-  }

Is this a problem with grunt-csscomb, or the source CSScomb?

@tonyganch
Copy link
Member

That is .csscomb.json having fun.
Default config has properties divided into several groups that get separated by new lines after sorting.
And those media queries — check out block-indent option.

You might want to leave sort-order option only in your config and unite all options in one array.
Anyway, csscomb.js is the project responsible for this issue.

@mdo
Copy link
Author

mdo commented Dec 9, 2013

Awesome, thanks so much—going back to one array and setting "block-indent": 2 fixed everything up. Apologies on the wrong repo—wasn't sure if implementation differed from the mothership.

<3 for the help.

@mdo mdo closed this as completed Dec 9, 2013
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