We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 530b8fe commit 4b5d775Copy full SHA for 4b5d775
2 files changed
lib/options/colon-space.js
@@ -0,0 +1,23 @@
1
+module.exports = {
2
+
3
+ value: false,
4
5
+ /**
6
+ * Processes tree node.
7
+ * @param {String} nodeType
8
+ * @param {node} node
9
+ */
10
+ process: function(nodeType, node) {
11
+ if (nodeType === 'property') {
12
+ if (node[node.length - 1][0] === 's') node.pop();
13
+ if (this.value === 'both' || this.value === 'before')
14
+ node.push(['s', ' ']);
15
+ }
16
+ if (nodeType === 'value') {
17
+ if (node[0][0] === 's') node.shift();
18
+ if (this.value === 'both' || this.value === 'after')
19
+ node.unshift(['s', ' ']);
20
21
22
23
+};
test/test.css
@@ -45,9 +45,9 @@ div {
45
}
46
47
a{
48
-top:0;/* ololo */margin:0;}
+top: 0;/* ololo */margin :0;}
49
b{
50
-top:0/* trololo */;margin:0;}
+top :0/* trololo */;margin : 0;}
51
52
53
0 commit comments