Skip to content

Commit 2dd523a

Browse files
committed
Updates the coloring
1 parent 10d6372 commit 2dd523a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Unreleased ##
2+
3+
* Changes coloring to the selectors and declarations
4+
15
## 0.2.0 - 3/24/2013 ##
26

37
* Colorizes text output.

lib/csscss/reporter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ def report(options = {})
1010

1111
io = StringIO.new
1212
@redundancies.each do |selector_groups, declarations|
13-
selector_groups = selector_groups.map {|selectors| maybe_color("{#{selectors}}", :red, should_color) }
13+
selector_groups = selector_groups.map {|selectors| "{#{maybe_color(selectors, :red, should_color)}}" }
1414
last_selector = selector_groups.pop
1515
count = declarations.size
1616
io.puts %Q(#{selector_groups.join(", ")} AND #{last_selector} share #{maybe_color(count, :red, should_color)} rule#{"s" if count > 1})
1717
if verbose
18-
declarations.each {|dec| io.puts(maybe_color(" - #{dec}", :yellow, should_color)) }
18+
declarations.each {|dec| io.puts(" - #{maybe_color(dec, :yellow, should_color)}") }
1919
end
2020
end
2121

0 commit comments

Comments
 (0)