5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/scarpe/wv/border.rb', line 5
def style
styles = (super if defined?(super)) || {}
return styles unless @border_color
border_color = case @border_color
when Range
{ "border-image": "linear-gradient(45deg, #{@border_color.first}, #{@border_color.last})" }
when Array
{ "border-color": "rgba(#{@border_color.join(", ")})" }
else
{ "border-color": @border_color }
end
styles.merge(
"border-style": "solid",
"border-width": "#{@options[:strokewidth] || 1}px",
"border-radius": "#{@options[:curve] || 0}px",
).merge(border_color)
end
|