Sha256: 1deddb7a1d35a5e4e01c37a7a28e1f29415a7246b80ce157e205ea663d83bd05

Contents?: true

Size: 978 Bytes

Versions: 1

Compression:

Stored size: 978 Bytes

Contents

# frozen_string_literal: true

new({ renderer: :html, method: :smooth, type: :string }) do |value, _user_proc|
  format_params = case value
                  when Array
                    data_collected = []
                    value.each do |param|
                      data_collected << "#{param}px"
                    end
                    data_collected.join(' ')
                  when Integer
                    "#{value}px"
                  else
                    if value.is_a?(String) && value.end_with?('%')
                      value
                    else
                      "#{value}px"
                    end
                  end
  html.style('border-radius', format_params)
end

new({ renderer: :html, method: :blur, type: :integer }) do |params, _user_proc|
    if params[:affect] == :back || params[:affect] == :back
      html.backdropFilter(:blur, "#{params[:value]}px")
    else
      html.filter(:blur, "#{params[:value]}px")
    end
  end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
atome-0.5.6.4.8 lib/renderers/html/effect.rb