Sha256: 5f6ae2e8ef59b9ce62df6589caddef2eb0aa7817c3752aa0cfb653483213ce89

Contents?: true

Size: 950 Bytes

Versions: 24

Compression:

Stored size: 950 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
      html.backdropFilter(:blur, "#{params[:value]}px")
    else
      html.filter(:blur, "#{params[:value]}px")
    end
  end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
atome-0.5.6.4.5 lib/renderers/html/effect.rb
atome-0.5.6.4.2 lib/renderers/html/effect.rb
atome-0.5.6.4.1 lib/renderers/html/effect.rb
atome-0.5.6.4.0 lib/renderers/html/effect.rb
atome-0.5.6.3.9 lib/renderers/html/effect.rb
atome-0.5.6.3.6 lib/renderers/html/effect.rb
atome-0.5.6.3.5 lib/renderers/html/effect.rb
atome-0.5.6.3.1 lib/renderers/html/effect.rb
atome-0.5.6.3.0 lib/renderers/html/effect.rb
atome-0.5.6.2.9 lib/renderers/html/effect.rb
atome-0.5.6.2.7 lib/renderers/html/effect.rb
atome-0.5.6.2.5 lib/renderers/html/effect.rb
atome-0.5.6.2.4 lib/renderers/html/effect.rb
atome-0.5.6.2.3 lib/renderers/html/effect.rb
atome-0.5.6.2.1 lib/renderers/html/effect.rb
atome-0.5.6.2.0 lib/renderers/html/effect.rb
atome-0.5.6.1.9 lib/renderers/html/effect.rb
atome-0.5.6.1.4 lib/renderers/html/effect.rb
atome-0.5.6.1.1 lib/renderers/html/effect.rb
atome-0.5.6.1.0 lib/renderers/html/effect.rb