beautiful-css 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/beautiful-css/engine.rb +1 -1
- data/lib/beautiful-css/version.rb +1 -1
- data/spec/convertions_spec.rb +12 -0
- metadata +1 -1
data/lib/beautiful-css/engine.rb
CHANGED
@@ -51,7 +51,7 @@ module BeautifulCss
|
|
51
51
|
rules[prop].keys.each do |selector|
|
52
52
|
val = rules[prop][selector]
|
53
53
|
prop_val = "{ #{prop}:#{val} }"
|
54
|
-
groups[prop_val] = [] if !(
|
54
|
+
groups[prop_val] = [] if !( groups.has_key? prop_val)
|
55
55
|
groups[prop_val] << selector
|
56
56
|
end
|
57
57
|
end
|
data/spec/convertions_spec.rb
CHANGED
@@ -118,6 +118,18 @@ CLEAN
|
|
118
118
|
|
119
119
|
|
120
120
|
|
121
|
+
it 'should group selectors' do
|
122
|
+
dirty = <<DIRTY
|
123
|
+
a { color:green }
|
124
|
+
b { color:green }
|
125
|
+
DIRTY
|
126
|
+
clean = <<CLEAN
|
127
|
+
a,
|
128
|
+
b
|
129
|
+
{ color:green }
|
130
|
+
CLEAN
|
131
|
+
assert_renders dirty, clean
|
132
|
+
end
|
121
133
|
|
122
134
|
|
123
135
|
|