Skip to content

Commit 65f0c78

Browse files
committed
[options] #378: Hack for braces in space-between-declarations
1 parent 9767591 commit 65f0c78

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

Diff for: lib/options/space-between-declarations.js

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ module.exports = (function() {
6666
var value = this.getValue('space-between-declarations');
6767

6868
// TODO: Limit nodes to blocks, stylesheet, etc.
69+
// XXX: Hack for braces
70+
if (node.is('braces')) return;
6971

7072
for (var i = 0, l = node.length; i < l; i++) {
7173
if (!node.get(i) || !node.get(i).is('declarationDelimiter')) continue;
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@media (min-width: 768px) {
2+
body { background: red; }
3+
}

Diff for: test/options/space-between-declarations/test.js

+5
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,9 @@ describe('options/space-between-declarations:', function() {
3838
this.comb.configure({ 'space-between-declarations': '\n ' });
3939
this.shouldBeEqual('issue-239.css', 'issue-239.expected.css');
4040
});
41+
42+
it('Issue 378', function() {
43+
this.comb.configure({ 'space-between-declarations': '\n' });
44+
this.shouldBeEqual('issue-378.css');
45+
});
4146
});

0 commit comments

Comments
 (0)