Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Don't convert color names

  • Loading branch information...
commit e48a18e247819b70f4524a56629c3ca5397b0733 1 parent 9e96a84
Joe Van Dyk authored

Showing 1 changed file with 2 additions and 4 deletions. Show diff stats Hide diff stats

  1. +2 4 lib/sass/script/color.rb
6 lib/sass/script/color.rb
@@ -173,7 +173,7 @@ class << self; include Sass::Util; end
173 173
174 174 # Constructs an RGB or HSL color object,
175 175 # optionally with an alpha channel.
176   - #
  176 + #
177 177 # The RGB values must be between 0 and 255.
178 178 # The saturation and lightness values must be between 0 and 100.
179 179 # The alpha value must be between 0 and 1.
@@ -498,8 +498,6 @@ def mod(other)
498 498 # @return [String] The string representation
499 499 def to_s(opts = {})
500 500 return rgba_str if alpha?
501   - return smallest if options[:style] == :compressed
502   - return COLOR_NAMES_REVERSE[rgb] if COLOR_NAMES_REVERSE[rgb]
503 501 hex_str
504 502 end
505 503 alias_method :to_sass, :to_s
@@ -533,7 +531,7 @@ def hex_str
533 531 def piecewise(other, operation)
534 532 other_num = other.is_a? Number
535 533 if other_num && !other.unitless?
536   - raise Sass::SyntaxError.new("Cannot add a number with units (#{other}) to a color (#{self}).")
  534 + raise Sass::SyntaxError.new("Cannot add a number with units (#{other}) to a color (#{self}).")
537 535 end
538 536
539 537 result = []

0 comments on commit e48a18e

Please sign in to comment.
Something went wrong with that request. Please try again.