{"id":22,"date":"2007-05-18T12:39:54","date_gmt":"2007-05-18T16:39:54","guid":{"rendered":"http:\/\/ryepup.unwashedmeme.com\/blog\/2007\/05\/18\/pretty-icons-using-css-and-mark-james-silk-icons\/"},"modified":"2007-05-18T12:39:54","modified_gmt":"2007-05-18T16:39:54","slug":"pretty-icons-using-css-and-mark-james-silk-icons","status":"publish","type":"post","link":"http:\/\/ryepup.unwashedmeme.com\/blog\/2007\/05\/18\/pretty-icons-using-css-and-mark-james-silk-icons\/","title":{"rendered":"Pretty icons using CSS and Mark James&#8217; Silk Icons"},"content":{"rendered":"<p>I recently saw a post via reddit on <a href=\"http:\/\/particletree.com\/features\/rediscovering-the-button-element\/\">Rediscovering the button element<\/a> about making nice buttons with little icons, and was introduced to the <a href=\"http:\/\/www.famfamfam.com\/lab\/icons\/silk\/\">Silk Icons<\/a> available from <a href=\"http:\/\/www.famfamfam.com\/\">Mark James<\/a>.  Mark has released these under a <a href=\"http:\/\/creativecommons.org\/licenses\/by\/2.5\/\">Creative Commons Attribution<\/a> license, any my UIs will be better for it.\n<\/p>\n<p>\nI went through last night and gave a little face-lift to one of my intranet projects, and it looks a <strong>lot<\/strong> nicer now.  I added icons to buttons and links using CSS.<\/p>\n<p>Here&#8217;s the css I used:<br \/>\n[css]<br \/>\n.icon<br \/>\n{<br \/>\n\tbackground-repeat:no-repeat;<br \/>\n\tpadding-left:20px;<br \/>\n}<\/p>\n<p>.delete-icon<br \/>\n{<br \/>\n\tbackground-image:url(&#8216;icons\/cross.png&#8217;);<br \/>\n}<\/p>\n<p>.edit-icon<br \/>\n{<br \/>\n\tbackground-image:url(&#8216;icons\/pencil.png&#8217;);<br \/>\n}<\/p>\n<p>[\/css]<br \/>\nand so forth, with a <code>*-icon<\/code> for the different icons I wanted.  Then, I decorated my buttons, links, and what-have-you by adding a <code>class=\"icon foo-icon\"<\/code> attribute.  There are other ways accomplish that with CSS, but I liked this scheme the best.  In the end, I have added nothing significant to the markup, but made everything else look a lot nicer:<\/p>\n<div style=\"padding-left:20px\">\n<img decoding=\"async\" id=\"image23\" src=\"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-content\/uploads\/2007\/05\/silk-3.png\" alt=\"Silk icon example 3\" \/><img decoding=\"async\" id=\"image21\" src=\"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-content\/uploads\/2007\/05\/silk-2.png\" alt=\"Silk icon example 2\" \/><img decoding=\"async\" id=\"image20\" src=\"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-content\/uploads\/2007\/05\/silk-1.png\" alt=\"Silk icon example\" \/>\n<\/div>\n<\/p>\n<p>\nThanks a lot, Mark!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently saw a post via reddit on Rediscovering the button element about making nice buttons with little icons, and was introduced to the Silk Icons available from Mark James. Mark has released these under a Creative Commons Attribution license, any my UIs will be better for it. I went through last night and gave [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,10,8],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-code-snippet","category-design","category-open-source"],"_links":{"self":[{"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":0,"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"wp:attachment":[{"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ryepup.unwashedmeme.com\/blog\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}