lib/renderers/html/material.rb in atome-0.5.5.8.1 vs lib/renderers/html/material.rb in atome-0.5.5.8.5

- old
+ new

@@ -49,5 +49,19 @@ @apply.delete(object_id_to_remove) apply(@apply) end end end + + +new({ method: :border, type: :hash, renderer: :html }) do |value, _user_proc| + thickness = value[:thickness] || 5 + type = value[:pattern] || :solid + color = if value[:color] + color_found = value[:color] + "#{color_found.red * 255},#{color_found.green * 255},#{color_found.blue * 255},#{color_found.alpha} " + else + "0,0,0,1" + end + + html.style(:border, "#{type} #{thickness}px rgba(#{color})") +end \ No newline at end of file