{"id":307,"date":"2013-07-11T15:43:30","date_gmt":"2013-07-11T15:43:30","guid":{"rendered":"http:\/\/milcke.org\/?p=307"},"modified":"2013-07-11T15:43:30","modified_gmt":"2013-07-11T15:43:30","slug":"refer-to-resources-in-css-with-jsf-2","status":"publish","type":"post","link":"https:\/\/landmesser.me\/?p=307","title":{"rendered":"Refer to resources in CSS with JSF 2"},"content":{"rendered":"<p>Amazing how difficult it is to find out how to refer to images in a CSS file in JSF 2 using libraries. But finally I found it out with the help of a colleague.<\/p>\n<p>Imagine you have an image <code>background.png<\/code> in a resource library called <code>images<\/code>. When you want to use this image as background in CSS you just write<\/p>\n<pre class=\"prettyprint\">\n.myclass {\n    background-image: url(#{resource&#91;&#39;images:background.png&#39;&#93;});\n}\n<\/pre>\n<p>Not so difficult, isn&#8217;t it?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Amazing how difficult it is to find out how to refer to images in a CSS file in JSF 2 using libraries. But finally I found it out with the help of a colleague. Imagine you have an image background.png &hellip; <a href=\"https:\/\/landmesser.me\/?p=307\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-307","post","type-post","status-publish","format-standard","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/landmesser.me\/index.php?rest_route=\/wp\/v2\/posts\/307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/landmesser.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/landmesser.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/landmesser.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/landmesser.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=307"}],"version-history":[{"count":0,"href":"https:\/\/landmesser.me\/index.php?rest_route=\/wp\/v2\/posts\/307\/revisions"}],"wp:attachment":[{"href":"https:\/\/landmesser.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/landmesser.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/landmesser.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}