Method: Vedeu::DSL::Presentation#background

Defined in:
lib/vedeu/dsl/presentation.rb

#background(value = '') ⇒ String Also known as: bg, bgcolor, background=, bg=, bgcolor=

Note:

The last defined background colour for a particular interface, line or stream overrides previously defined entries in the same block.

Define the background colour for an interface, line, or a stream. When called with a block, will create a new stream with the background colour specified. When the block terminates, the background will return to that of the parent.

Examples:

interface 'my_interface' do
  background '#0022ff' # /or/ (blue)
  bgcolor    '#22ff00' # /or/ (blue is overridden to green)
  bg         '#ff0022' #      (green is overridden to red)
  # ...

  lines do
    background '#2200ff'
    # ...

    stream do
      background '#22ff00'
      # ...
    end
  end
end

Parameters:

  • value (String) (defaults to: '')

    A HTML/CSS value.

Returns:

  • (String)


41
42
43
# File 'lib/vedeu/dsl/presentation.rb', line 41

def background(value = '')
  colour(background: Vedeu::Colours::Background.coerce(value))
end