def style_and_context(element, element_id, &block)
      style_method = "#{element_id}_style"
      if parent_layout.respond_to?(style_method) || block_given?
        parent_layout.context(element) do
          if parent_layout.respond_to?(style_method)
            parent_layout.send(style_method)
          end

          if block_given?
            yield
          end
        end
      end
    end
def style_and_context(element, element_id, &block)
      style_method = "#{element_id}_style"
      if parent_layout.respond_to?(style_method) || block_given?
        parent_layout.context(element) do
          if parent_layout.respond_to?(style_method)
            parent_layout.send(style_method)
          end

          if block_given?
            yield
          end
        end
      end
    end
Calls the `_style` method with the element as the context, and runs the
 optional block in that context.  This is usually done immediately after
 `initialize_element`, except in the case of `add`, which adds the item to
 the tree before styling it.