mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 00:55:11 -07: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
|
end
|
||||||
|
|
||||||
def stylesheet_tag(url, media = "all")
|
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
|
end
|
||||||
|
|
||||||
def link_to(link, url, title = "")
|
def link_to(link, url, title = "")
|
||||||
|
|||||||
Reference in New Issue
Block a user