Class: UtilityColors::Properties
- Inherits:
-
Object
- Object
- UtilityColors::Properties
- Defined in:
- lib/utility_colors/properties.rb
Class Method Summary collapse
- .get_property(*keys) ⇒ Object
- .pseudo_action ⇒ Object
- .pseudo_child ⇒ Object
- .pseudo_input ⇒ Object
-
.pseudo_input_extra ⇒ Object
TODO: add it in.
- .pseudos ⇒ Object
- .screen_sizes ⇒ Object
Class Method Details
.get_property(*keys) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/utility_colors/properties.rb', line 5 def self.get_property(*keys) keys = [keys] unless keys.is_a?(Array) property = UtilityColors::Properties.send(keys[0]) property = property.dig(*keys.slice(1..-1)) if keys.length > 1 property end |
.pseudo_action ⇒ Object
46 47 48 49 50 51 52 53 54 |
# File 'lib/utility_colors/properties.rb', line 46 def self.pseudo_action [ 'active', 'hover', 'link', 'target', 'visited' ] end |
.pseudo_child ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/utility_colors/properties.rb', line 56 def self.pseudo_child [ 'root', 'first-child', 'first-of-type', 'last-child', 'last-of-type', 'only-of-type', 'only-child', 'empty' # // nth-child(n}, # // nth-last-child(n}, # // nth-last-of-type(n}, # // nth-of-type(n}, ] end |
.pseudo_input ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/utility_colors/properties.rb', line 23 def self.pseudo_input [ 'checked', 'disabled', 'enabled', 'focus' ] end |
.pseudo_input_extra ⇒ Object
TODO: add it in
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/utility_colors/properties.rb', line 33 def self.pseudo_input_extra [ 'in-range', 'invalid', 'optional', 'out-of-range', 'read-only', 'read-write', 'require', 'valid' ] end |
.pseudos ⇒ Object
73 74 75 |
# File 'lib/utility_colors/properties.rb', line 73 def self.pseudos UtilityColors::Properties.pseudo_input + UtilityColors::Properties.pseudo_action + UtilityColors::Properties.pseudo_child end |
.screen_sizes ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/utility_colors/properties.rb', line 14 def self.screen_sizes { 'sm' => '325px', 'md' => '768px', 'lg' => '1024px', 'xl' => '1440px' } end |