Class: TodoList

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

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, #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_list_stylesObject



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/glimmer-dsl-web/samples/regular/todo_mvc/views/todo_list.rb', line 38

def todo_list_styles
  rule('.main') {
    border_top '1px solid #e6e6e6'
    position 'relative'
    z_index '2'
  }
  
  rule('.toggle-all') {
    border 'none'
    bottom '100%'
    height '1px'
    opacity '0'
    position 'absolute'
    right '100%'
    width '1px'
  }
        
  rule('.toggle-all+label') {
    align_items 'center'
    display 'flex'
    font_size '0'
    height '65px'
    justify_content 'center'
    left '0'
    position 'absolute'
    top '-65px'
    width '45px'
  }
  
  rule('.toggle-all+label:before') {
    color '#949494'
    content '"❯"'
    display 'inline-block'
    font_size '22px'
    padding '10px 27px'
    _webkit_transform 'rotate(90deg)'
    transform 'rotate(90deg)'
  }
  
  rule('.toggle-all:focus+label, .toggle:focus+label, :focus') {
    box_shadow '0 0 2px 2px #cf7d7d'
    outline '0'
  }
  
  rule('.todo-list') {
    list_style 'none'
    margin '0'
    padding '0'
  }
end