{"id":685,"date":"2011-01-14T07:31:09","date_gmt":"2011-01-14T14:31:09","guid":{"rendered":"http:\/\/www.curtisgibby.com\/blog\/?p=685"},"modified":"2016-05-11T06:44:08","modified_gmt":"2016-05-11T12:44:08","slug":"css-woes-at-ebay","status":"publish","type":"post","link":"https:\/\/www.curtisgibby.com\/blog\/2011\/01\/css-woes-at-ebay\/","title":{"rendered":"CSS woes at eBay"},"content":{"rendered":"<p>I don&#8217;t generally pay a ton of attention to web typography, but I must have it on my mind after building a new backend for our replicated sites.\u00a0 I spotted this on an eBay order confirmation screen this morning:<\/p>\n<p><a href=\"\/blog\/wp-content\/uploads\/2011\/01\/ebay-checkout-fonts.png\"><img loading=\"lazy\" decoding=\"async\" title=\"ebay checkout fonts\" src=\"\/blog\/wp-content\/uploads\/2011\/01\/ebay-checkout-fonts.png\" alt=\"\" width=\"524\" height=\"169\" \/><\/a><\/p>\n<p>Yes, that&#8217;s three different fonts for three different headers&#8230; on the same page.<\/p>\n<p><!--more--><\/p>\n<p>The first is an H2 of class &#8220;g-m0 g-m dsp&#8221; that just inherits the body&#8217;s &#8220;Arial,Helvetica,sans-serif&#8221; font-family.<\/p>\n<p>The second is another H2, this one with class &#8220;h2Titles&#8221;.\u00a0 It gets font-family &#8220;Trebuchet&#8221; &#8212; which apparently I don&#8217;t have installed on my machine, because I see the crappy default Times New Roman.\u00a0 (Yes, they specified exactly one font &#8212; incorrectly.\u00a0 Apparently they haven&#8217;t heard of font stacks.)<\/p>\n<p>The third H2 is probably what they wanted for all of these.\u00a0 It has class &#8220;h2Title&#8221; (as opposed to &#8220;h2Title<span style=\"color: #ff0000;\">s<\/span>&#8221; above) and gets the correct font &#8220;Trebuchet MS&#8221;.<\/p>\n<p>What a mess.\u00a0 This is one of the biggest e-commerce companies in the world and they can&#8217;t get their CSS right.\u00a0 (This isn&#8217;t exactly bleeding-edge web technology, guys &#8212; the font-family part of the CSS spec came out <a href=\"http:\/\/en.wikipedia.org\/wiki\/Css\">14 years ago<\/a>.)<\/p>\n<p>Here&#8217;s how they could have prevented this train wreck of a page.\u00a0 First, set up a CSS reset that hits every single H2 (and anything else that you may want to look good) with a solid definition.\u00a0 Next, add some progressive enhancement to certain H2s by adding a class.\u00a0 Third, check that the specified font rules are actually doing something to the intended target (as in the number 2 &#8220;Trebuchet&#8221; case above).\u00a0 Finally, at the very least, give your page a quick once-over to make sure that everything looks as you intended.<\/p>\n<p>At least they all got the same color &#8212; <span style=\"color: #5d5d5d;\">#5D5D5D<\/span> looks pretty nice.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I don&#8217;t generally pay a ton of attention to web typography, but I must have it on my mind after building a new backend for our replicated sites.\u00a0 I spotted this on an eBay order confirmation screen this morning: Yes, that&#8217;s three different fonts for three different headers&#8230; on the same page.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[102,126,35],"class_list":["post-685","post","type-post","status-publish","format-standard","hentry","category-programming","tag-css","tag-ebay","tag-fonts","entry"],"_links":{"self":[{"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/posts\/685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/comments?post=685"}],"version-history":[{"count":7,"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/posts\/685\/revisions"}],"predecessor-version":[{"id":819,"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/posts\/685\/revisions\/819"}],"wp:attachment":[{"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/media?parent=685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/categories?post=685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.curtisgibby.com\/blog\/wp-json\/wp\/v2\/tags?post=685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}