Class: TodoInput

Inherits:
Object
  • Object
show all
Includes:
Glimmer::Web::Component
Defined in:
lib/glimmer-dsl-web/samples/regular/todo_mvc/views/todo_input.rb

Overview

Superclass for NewTodoInput and EditTodoInput with common styles

Direct Known Subclasses

EditTodoInput, NewTodoInput

Instance Attribute Summary

Attributes included from Glimmer::Web::Component

#args, #markup_root, #options, #parent

Instance Method Summary collapse

Methods included from Glimmer::Web::Component

add_component_namespaces_for, #add_observer, #attribute_setter, #can_add_observer?, #can_handle_observation_request?, component_namespaces, #content, for, #get_attribute, #handle_observation_request, #has_attribute?, #has_instance_method?, included, #initialize, interpretation_stack, #local_respond_to?, #method_missing, namespaces_for_class, #observer_registrations, #post_add_content, #post_initialize_child, #remove, #render, reset_component_namespaces, #respond_to_missing?, #set_attribute

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Glimmer::Web::Component

Instance Method Details

#todo_input_classObject



5
6
7
# File 'lib/glimmer-dsl-web/samples/regular/todo_mvc/views/todo_input.rb', line 5

def todo_input_class
  'todo-input'
end

#todo_input_stylesObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/glimmer-dsl-web/samples/regular/todo_mvc/views/todo_input.rb', line 9

def todo_input_styles
  rule(".#{todo_input_class}") {
    position 'relative'
    margin '0'
    width '100%'
    font_size '24px'
    font_family 'inherit'
    font_weight 'inherit'
    line_height '1.4em'
    color 'inherit'
    padding '6px'
    border '1px solid #999'
    box_shadow 'inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2)'
    box_sizing 'border-box'
    _webkit_font_smoothing 'antialiased'
  }
  
  rule(".#{todo_input_class}::selection") {
    background 'red'
  }
end