Permalink
Browse files

Merge pull request #7 from antonaavik/master

Optional: vertically align selector property values
  • Loading branch information...
2 parents 7638d8e + bbd278a commit 4caa03177e4cbc1c21f80b087299fbb05a492e97 @stolksdorf committed Feb 28, 2014
Showing with 6 additions and 2 deletions.
  1. +4 −1 CleanCSS.py
  2. +2 −1 CleanCSS.sublime-settings
View
5 CleanCSS.py
@@ -9,7 +9,10 @@ def colonPad(s, desired_index):
return s
parts = s.split(":",1)
ruleName = parts[0].strip()
- colonDist = desired_index - len(ruleName) + 1
+ if(settings.get('vertically_align_selector_property_values')):
+ colonDist = desired_index - len(ruleName) + 1
+ else:
+ colonDist = 0
return "".join([
parts[0].rstrip(),
View
3 CleanCSS.sublime-settings
@@ -5,7 +5,8 @@
// 0 to disable
"num_rules_to_collaspe" : 3,
-
+ //Vertically align selector property values
+ "vertically_align_selector_property_values" : 1,
//Your css rules will be order by category in the order they appear here, and ordered within
// each category as they are here as well

0 comments on commit 4caa031

Please sign in to comment.