lib/roadie/style_declaration.rb in roadie-2.3.4 vs lib/roadie/style_declaration.rb in roadie-2.4.0
- old
+ new
@@ -21,14 +21,22 @@
important ? 1 : -1
end
end
def to_s
- [property, value].join(':')
+ [property, value_with_important].join(':')
end
def inspect
- extra = [important ? '!important' : nil, specificity].compact
- "#{to_s} (#{extra.join(' , ')})"
+ "#{to_s} (#{specificity})"
+ end
+
+ private
+ def value_with_important
+ if important
+ "#{value} !important"
+ else
+ value
+ end
end
end
end