Class: Styles::Properties::BackgroundColor

Inherits:
Base
  • Object
show all
Defined in:
lib/styles/properties/background_color.rb

Constant Summary collapse

VALUES =
(Styles::Colors::COLOR_VALUES + [:none]).freeze

Instance Attribute Summary

Attributes inherited from Base

#name, #selector, #value

Instance Method Summary collapse

Methods inherited from Base

#colors, #initialize, multiple_names?, names, other_names, sub_engine, sub_engines, to_sym

Constructor Details

This class inherits a constructor from Styles::Properties::Base

Instance Method Details

#color_to_useObject

Convert foreground colors to background



9
10
11
12
# File 'lib/styles/properties/background_color.rb', line 9

def color_to_use
  return :no_bg_color if value == :none
  value =~ /^on_/ ? value : "on_#{value}".to_sym
end