Sha256: b1677563be03d342abd86c36dd80331a7368608a56b46d44037b2354e2c8640d

Contents?: true

Size: 1.93 KB

Versions: 1

Compression:

Stored size: 1.93 KB

Contents

# frozen_string_literal: true

new({ method: :left, type: :integer, renderer: :html }) do |params|
  unit = @unit[:left] || :px
  js[:style][:left] = "#{params}#{unit}"
end

new({ method: :top, type: :integer, renderer: :html }) do |params|
  unit = @unit[:top] || :px
  # alert  unit
  js[:style][:top] = "#{params}#{unit}"
end
new({ method: :bottom, type: :integer, renderer: :html }) do |params|
  unit = @unit[:bottom] || :px
  js[:style][:bottom] =  "#{params}#{unit}"
end

new({ method: :right, type: :integer, renderer: :html }) do |params|
  unit = @unit[:right] || :px

  js[:style][:right] =  "#{params}#{unit}"
end

new({ method: :top, type: :integer, renderer: :html, specific: :shadow })

# new({ method: :top, type: :integer, renderer: :html, specific: :text }) do |params|
#   unit = @unit[:left] || :px
#   html.style(:top,  "#{params}#{unit}"
# end
#
# new({ method: :bottom, type: :integer, renderer: :html, specific: :text }) do |params|
#   html.style(:bottom,  "#{params}#{unit}")
# end

new({ method: :left, type: :integer, specific: :color, renderer: :html })

new({ method: :left, type: :integer, renderer: :html, specific: :shadow })

new({ method: :top, type: :integer, specific: :color, renderer: :html })

new({ method: :rotate, type: :integer, renderer: :html }) do |params|
  html.transform(:rotate, params)
end

new({ method: :rotate, type: :integer, renderer: :html, specific: :paint })

new({ renderer: :html, method: :position }) do |params|
  html.style("position", params)
end

new({ renderer: :html, method: :depth }) do |params|
  html.style("z-index", params)
end

new({ method: :organise, renderer: :html }) do |params|
  html.style(:gridTemplateColumns, params)
end

new({ method: :spacing, renderer: :html }) do |params|
  html.style(:gap, "#{params}px")
end

new({ method: :display, renderer: :html }) do |params|
  html.style(:display, params)
end

new({ renderer: :html, method: :center }) do |params|
  html.center(params, attach)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
atome-0.5.5.9.1 lib/renderers/html/spatial.rb