Sha256: faa8a1ebc55e9f29642444932274f70f0fea42c2d852628fe2c1e8036af7beec

Contents?: true

Size: 875 Bytes

Versions: 12

Compression:

Stored size: 875 Bytes

Contents

# frozen_string_literal: true

new({ method: :width, type: :integer, renderer: :html }) do |value, _user_proc|
  unit_found = unit[:width]
  if unit_found
    html.style(:width, "#{value}#{unit_found}")
  elsif value.instance_of? Integer
    html.style(:width, "#{value}px")
  else
    html.style(:width, value)
  end
end

new({ method: :height, renderer: :html, type: :string }) do |value, _user_proc|
  unit_found = unit[:height]
  if unit_found
    html.style(:height, "#{value}#{unit_found}")
  elsif value.instance_of? Integer
    html.style(:height, "#{value}px")
  else
    html.style(:height, value)
  end
end

new({ method: :size, type: :hash, renderer: :html }) do |value, _user_proc|
  # html.style('fontSize',"#{value}px")
end

new({ method: :size, type: :int, renderer: :html, specific: :text }) do |value, _user_proc|
  html.style('fontSize', "#{value}px")
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
atome-0.5.5.8.1 lib/renderers/html/geometry.rb
atome-0.5.5.7.7 lib/renderers/html/geometry.rb
atome-0.5.5.7.5 lib/renderers/html/geometry.rb
atome-0.5.5.7.3 lib/renderers/html/geometry.rb
atome-0.5.5.7.1 lib/renderers/html/geometry.rb
atome-0.5.5.7.0 lib/renderers/html/geometry.rb
atome-0.5.5.6.9 lib/renderers/html/geometry.rb
atome-0.5.5.6.8 lib/renderers/html/geometry.rb
atome-0.5.5.6.7.9 lib/renderers/html/geometry.rb
atome-0.5.5.6.6 lib/renderers/html/geometry.rb
atome-0.5.5.6.5 lib/renderers/html/geometry.rb
atome-0.5.5.6.4 lib/renderers/html/geometry.rb