{"id":946,"date":"2015-01-30T07:28:27","date_gmt":"2015-01-30T13:28:27","guid":{"rendered":"http:\/\/cssnewbie.com\/?p=946"},"modified":"2015-01-30T07:28:27","modified_gmt":"2015-01-30T13:28:27","slug":"css-typographic-reset-step-by-step","status":"publish","type":"post","link":"https:\/\/cssdeck.com\/blog\/css-typographic-reset-step-by-step\/","title":{"rendered":"CSS Typographic Reset: Step By Step"},"content":{"rendered":"<p>A <a href=\"http:\/\/www.cssreset.com\/what-is-a-css-reset\/\">CSS reset<\/a> is a short set of rules that resets the styling of all the basic HTML elements. In the same way that you set basic CSS rules, applying a reset will give you a baseline set of variables for everything you create.  For example, if you were using <a href=\"http:\/\/css3files.com\/background\/\">CSS to apply a background<\/a> to all tables, you would set a very basic set of rules for that table. For example:<\/p>\n<pre>\ntable {\nbackground: #888;\n}\n<\/pre>\n<p>That would make all your future tables have a grey background, unless you specified otherwise based on class or ID. <\/p>\n<p>So if you are creating a new <a href=\"http:\/\/www.wpstuffs.com\/themes\/\">WordPress theme<\/a>, or a custom coded site, you&#8217;ll want to set some baseline parameters first.  Most notably, typography.  So let&#8217;s say I want to set some basic rules to start off my theme:<\/p>\n<h2>Theme First Rules Including Typography<\/h2>\n<pre>\nbody { color: #000;  background: #fff; font-family: Georgia, \"Times New Roman\", Times, serif; }\n\na { color: #0074BD; font-size: 14px; text-decoration: none; font-family: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace; }\n\na:hover { color: #000; }\n\nh1, h2, h3, h4, h5, h6 { font-family: Arial, \"Helvetica Neue\", Helvetica, sans-serif; }\n\nul li {    list-style-type: disc;  list-style-image: none; font-family: Arial, \"Helvetica Neue\", Helvetica, sans-serif; }\n\ntable { background: #999; padding: 20px; font-family: Arial, \"Helvetica Neue\", Helvetica, sans-serif; }\n<\/pre>\n<p>Now this may look like some simple CSS rules, but if you don&#8217;t understand the affect on font typography, it may cause some serious frustration. Let&#8217;s breakdown the above:<\/p>\n<p><strong>All font that is not specified will be controlled by the body font-family selection<\/strong><\/p>\n<p>Because I did not specify &#8220;div&#8221; rules, If I just type some text into a div, it will output with the following: <\/p>\n<pre>\ncolor: #000;\nfont-family: Georgia, \"Times New Roman\", Times, serif;\n<\/pre>\n<p>However, if I add a link or an heading tag, those have different font selections.  So based on the specified rules above, let&#8217;s see what I get with some HTML:<\/p>\n<div style=\"color: #000; padding: 15px;  background: #fff; font-family: Georgia, 'Times New Roman', Times, serif;\">This is a div element with a <a href=\"http:\/\/www.yourhtmlsource.com\/\" style=\"color: #0074BD; font-size: 14px; text-decoration: none; font-family: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace;\">link<\/a> and a header section with a list:<\/p>\n<h2 style=\"font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;\">Heading<\/h2>\n<ul>\n<li style=\"list-style-type: disc;  list-style-image: none; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;\">My list #1<\/li>\n<li style=\"list-style-type: disc;  list-style-image: none; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;\">My list #2<\/li>\n<\/ul>\n<\/div>\n<p>So you can see that the different rules apply themselves in the layers in which I defined them. There are some great pre-made reset packages over at <a href=\"http:\/\/www.cssreset.com\/\">CSS Reset<\/a>. <\/p>\n<div class=\"wp-socializer wpsr-share-icons \" data-lg-action=\"show\" data-sm-action=\"show\" data-sm-width=\"768\" ><h3>Share and Enjoy !<\/h3><div class=\"wpsr-si-inner\"><div class=\"wpsr-counter wpsrc-sz-32px\" style=\"color:#000\"><span class=\"scount\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"facebook,twitter,linkedin,pinterest,print,pdf\">0<\/span><\/span><small class=\"stext\">Shares<\/small><\/div><div class=\"socializer sr-popup sr-32px sr-circle sr-opacity sr-pad sr-count-1 sr-count-1\"><span class=\"sr-facebook\"><a rel=\"nofollow\" href=\"https:\/\/www.facebook.com\/share.php?u=\" target=\"_blank\"  title=\"Share this on Facebook\"  style=\"color: #ffffff\" ><i class=\"fab fa-facebook-f\"><\/i><span class=\"ctext\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"facebook\">0<\/span><\/span><\/a><\/span>\n<span class=\"sr-twitter\"><a rel=\"nofollow\" href=\"https:\/\/twitter.com\/intent\/tweet?text=%20-%20%20\" target=\"_blank\"  title=\"Tweet this !\"  style=\"color: #ffffff\" ><i class=\"fab fa-twitter\"><\/i><\/a><\/span>\n<span class=\"sr-linkedin\"><a rel=\"nofollow\" href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=\" target=\"_blank\"  title=\"Add this to LinkedIn\"  style=\"color: #ffffff\" ><i class=\"fab fa-linkedin-in\"><\/i><\/a><\/span>\n<span class=\"sr-pinterest\"><a rel=\"nofollow\" href=\"https:\/\/www.pinterest.com\/pin\/create\/button\/?url=&amp;media=&amp;description=\" target=\"_blank\"  title=\"Submit this to Pinterest\"  style=\"color: #ffffff\" data-pin-custom=\"true\"><i class=\"fab fa-pinterest\"><\/i><span class=\"ctext\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"pinterest\">0<\/span><\/span><\/a><\/span>\n<span class=\"sr-print\"><a rel=\"nofollow\" href=\"https:\/\/www.printfriendly.com\/print?url=\" target=\"_blank\"  title=\"Print this article \"  style=\"color: #ffffff\" ><i class=\"fa fa-print\"><\/i><\/a><\/span>\n<span class=\"sr-pdf\"><a rel=\"nofollow\" href=\"https:\/\/www.printfriendly.com\/print?url=\" target=\"_blank\"  title=\"Convert to PDF\"  style=\"color: #ffffff\" ><i class=\"fa fa-file-pdf\"><\/i><\/a><\/span><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>A CSS reset is a short set of rules that resets the styling of all the basic HTML elements. In the same way that you set basic CSS rules, applying a reset will give you a baseline set of variables [&#8230;]<\/p>\n<p><a class=\"more-link article\" href=\"https:\/\/cssdeck.com\/blog\/css-typographic-reset-step-by-step\/\" title=\"Click to read 'CSS Typographic Reset: Step By Step'\">Read Article<\/a><\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[168],"tags":[],"_links":{"self":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/946"}],"collection":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/comments?post=946"}],"version-history":[{"count":0,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/946\/revisions"}],"wp:attachment":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/media?parent=946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/categories?post=946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/tags?post=946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}