mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Only output media attribute if needed, delete redundant type attribute in stylesheet_tag
This commit is contained in:
@@ -18,7 +18,11 @@ module ShopFilter
|
||||
end
|
||||
|
||||
def stylesheet_tag(url, media = "all")
|
||||
%(<link href="#{url}" rel="stylesheet" type="text/css" media="#{media}" />)
|
||||
html = []
|
||||
html << %(<link href="#{url}" rel="stylesheet")
|
||||
html << %(media="#{media}") if media != "all"
|
||||
html << "/>"
|
||||
html.join(" ")
|
||||
end
|
||||
|
||||
def link_to(link, url, title = "")
|
||||
|
||||
Reference in New Issue
Block a user