Method: Sass::Script::Functions#opacity
- Defined in:
- lib/sass/script/functions.rb
#opacity($color) ⇒ Sass::Script::Value::Number
Returns the alpha component (opacity) of a color. This is 1 unless otherwise specified.
990 991 992 993 994 995 996 |
# File 'lib/sass/script/functions.rb', line 990
def opacity(color)
if color.is_a?(Sass::Script::Value::Number)
return identifier("opacity(#{color})")
end
assert_type color, :Color, :color
number(color.alpha)
end
|