3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'app/helpers/styles_helper.rb', line 3
def round(options={})
options[:amount] ||= 0.4
value_false = 0
value_true = "#{options[:amount]}em"
if options[:bottom_left]
bottom_left = {:value => value_true}
else
bottom_left = {:value => value_false}
end
if options[:bottom_right]
bottom_right = {:linebreak => true, :value => value_true}
else
bottom_right = {:linebreak => true, :value => value_false}
end
if options[:top_left]
top_left = {:linebreak => true, :value => value_true}
else
top_left = {:linebreak => true, :value => value_false}
end
if options[:top_right]
top_right = {:linebreak => true, :value => value_true}
else
top_right = {:linebreak => true, :value => value_false}
end
if options[:bottom_left] | options[:bottom_right] | options[:top_left] | options[:top_right]
if mui_browser == 'gecko'
title = "-moz-border-"
property("#{title}radius-bottomleft", bottom_left) +
property("#{title}radius-bottomright", bottom_right) +
property("#{title}radius-topleft", top_left) +
property("#{title}radius-topright", top_right)
elsif mui_browser == 'webkit'
title = "-webkit-border-"
property("#{title}bottom-left-radius", bottom_left) +
property("#{title}bottom-right-radius", bottom_right) +
property("#{title}top-left-radius", top_left) +
property("#{title}top-right-radius", top_right)
end
else
if mui_browser == 'gecko'
title = "-moz-border-"
elsif mui_browser == 'webkit'
title = "-webkit-border-"
end
property("#{title}radius", :value => value_true)
end
end
|