From c115977d8541c574f39bb99752f6a914b5799938 Mon Sep 17 00:00:00 2001 From: CK Hicks Date: Thu, 14 Aug 2014 23:47:17 -0500 Subject: [PATCH] minor code cleanup --- _/js/functions.js | 17 ++-------- footer.php | 4 +-- functions.php | 17 ---------- header.php | 3 +- reset.css | 54 +++++++++++++++++++------------ style.css | 81 +++-------------------------------------------- 6 files changed, 43 insertions(+), 133 deletions(-) diff --git a/_/js/functions.js b/_/js/functions.js index 32dffab..dce1a47 100644 --- a/_/js/functions.js +++ b/_/js/functions.js @@ -9,7 +9,7 @@ // remap jQuery to $ -(function($){ +(function ($) { /* trigger when page is ready */ $(document).ready(function (){ @@ -18,17 +18,4 @@ }); - - /* optional triggers - - $(window).load(function() { - - }); - - $(window).resize(function() { - - }); - - */ - -})(window.jQuery); \ No newline at end of file +}(window.jQuery || window.$)); \ No newline at end of file diff --git a/footer.php b/footer.php index 8926508..9d1a666 100644 --- a/footer.php +++ b/footer.php @@ -14,8 +14,6 @@ - - @@ -35,7 +33,7 @@ --> - + diff --git a/functions.php b/functions.php index 72e5371..e856ec9 100644 --- a/functions.php +++ b/functions.php @@ -63,23 +63,6 @@ function html5reset_wp_title( $title, $sep ) { // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'html5reset' ), max( $paged, $page ) ); -//FIX -// if (function_exists('is_tag') && is_tag()) { -// single_tag_title("Tag Archive for ""); echo '" - '; } -// elseif (is_archive()) { -// wp_title(''); echo ' Archive - '; } -// elseif (is_search()) { -// echo 'Search for "'.wp_specialchars($s).'" - '; } -// elseif (!(is_404()) && (is_single()) || (is_page())) { -// wp_title(''); echo ' - '; } -// elseif (is_404()) { -// echo 'Not Found - '; } -// if (is_home()) { -// bloginfo('name'); echo ' - '; bloginfo('description'); } -// else { -// bloginfo('name'); } -// if ($paged>1) { -// echo ' - page '. $paged; } return $title; } diff --git a/header.php b/header.php index c3e2af6..6c4e859 100644 --- a/header.php +++ b/header.php @@ -50,9 +50,10 @@ - device-width : Occupy full width of the screen in its current orientation - initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height - maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width + - minimal-ui = iOS devices have minimal browser ui by default */ if (true == of_get_option('meta_viewport')) - echo ''; + echo ''; /* diff --git a/reset.css b/reset.css index fb86dd2..8c22fdb 100644 --- a/reset.css +++ b/reset.css @@ -2,11 +2,11 @@ HTML5 Reset :: style.css ---------------------------------------------------------- We have learned much from/been inspired by/taken code where offered from: - + Eric Meyer :: http://meyerweb.com HTML5 Doctor :: http://html5doctor.com and the HTML5 Boilerplate :: http://html5boilerplate.com - + -------------------------------------------------------------------------------*/ /* Let's default this puppy out @@ -17,14 +17,27 @@ html, body, body div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquot padding: 0; border: 0; font-size: 100%; + font-weight: normal; vertical-align: baseline; background: transparent; -} - -/* consider resetting the default cursor: https://gist.github.com/murtaugh/5247154 */ +} article, aside, figure, footer, header, nav, section, details, summary {display: block;} +/* Handle box-sizing while better addressing child elements: + http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */ +html { + box-sizing: border-box; +} + +*, +*:before, +*:after { + box-sizing: inherit; +} + +/* consider resetting the default cursor: https://gist.github.com/murtaugh/5247154 */ + /* Responsive images and other embedded objects Note: keeping IMG here will cause problems if you're using foreground images as sprites. If this default setting for images is causing issues, you might want to replace it with a .responsive class instead. */ @@ -35,15 +48,15 @@ embed {max-width: 100%;} /* force a vertical scrollbar to prevent a jumpy page */ html {overflow-y: scroll;} -/* we use a lot of ULs that aren't bulleted. +/* we use a lot of ULs that aren't bulleted. don't forget to restore the bullets within content. */ ul {list-style: none;} blockquote, q {quotes: none;} -blockquote:before, -blockquote:after, -q:before, +blockquote:before, +blockquote:after, +q:before, q:after {content: ''; content: none;} a {margin: 0; padding: 0; font-size: 100%; vertical-align: baseline; background: transparent;} @@ -81,10 +94,9 @@ small {font-size: 85%;} strong {font-weight: bold;} -td, td img {vertical-align: top;} +td, td img {vertical-align: top;} -/* Make sure sup and sub don't screw with your line-heights - gist.github.com/413930 */ +/* Make sure sup and sub don't mess with your line-heights http://gist.github.com/413930 */ sub, sup {font-size: 75%; line-height: 0; position: relative;} sup {top: -0.5em;} sub {bottom: -0.25em;} @@ -94,10 +106,10 @@ pre, code, kbd, samp {font-family: monospace, sans-serif;} /* hand cursor on clickable elements */ .clickable, -label, -input[type=button], -input[type=submit], -input[type=file], +label, +input[type=button], +input[type=submit], +input[type=file], button {cursor: pointer;} /* Webkit browsers add a 2px margin outside the chrome of form elements */ @@ -106,16 +118,16 @@ button, input, select, textarea {margin: 0;} /* make buttons play nice in IE */ button, input[type=button] {width: auto; overflow: visible;} - + /* scale images in IE7 more attractively */ .ie7 img {-ms-interpolation-mode: bicubic;} -/* prevent BG image flicker upon hover +/* prevent BG image flicker upon hover (commented out as usage is rare, and the filter syntax messes with some pre-processors) .ie6 html {filter: expression(document.execCommand("BackgroundImageCache", false, true));} */ /* let's clear some floats */ -.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; } -.clearfix:after { clear: both; } -.clearfix { zoom: 1; } \ No newline at end of file +.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; } +.clearfix:after { clear: both; } +.clearfix { zoom: 1; } \ No newline at end of file diff --git a/style.css b/style.css index ddb793a..32b2223 100644 --- a/style.css +++ b/style.css @@ -1,4 +1,4 @@ -/* +/* Theme Name: The HTML5 Reset Theme Theme URI: http://html5reset.org Description: A style-free theme to get you started on an HTML5-based WordPress theme of your own. @@ -7,9 +7,6 @@ Author URI: http://monkeydo.biz Version: 2.0 */ -/* Apply a natural box layout model to all elements: http://paulirish.com/2012/box-sizing-border-box-ftw/ */ -* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } - .chromeframe {position: absolute; top: 0;} /* Ok, this is where the fun starts. @@ -28,10 +25,10 @@ a:hover {color: #69f;} /* Custom text-selection colors (remove any text shadows: http://twitter.com/miketaylr/status/12228805301) */ ::-moz-selection{background: #fcd700; color: #fff; text-shadow: none;} -::selection {background: #fcd700; color: #fff; text-shadow: none;} +::selection {background: #fcd700; color: #fff; text-shadow: none;} /* j.mp/webkit-tap-highlight-color */ -a:link {-webkit-tap-highlight-color: #fcd700;} +a:link {-webkit-tap-highlight-color: #fcd700;} ins {background-color: #fcd700; color: #000; text-decoration: none;} mark {background-color: #fcd700; color: #000; font-style: italic; font-weight: bold;} @@ -46,66 +43,6 @@ textarea:-moz-placeholder { color:#a9a9a9; } #wrapper {width: 960px; margin: 20px auto;} -.post {} - -.entry-content {} -.entry-content a {} -.entry-content a:hover {} - -#meta {} -.postmetadata {} - -#sidebar {} - -.navgation {} -.next-posts {} -.prev-posts {} - -#searchform {} -#s {} -#searchsubmt {} - -ol.commentlist {list-style: none;} -ol.commentlist li {} -ol.commentlist li.alt {} -ol.commentlist li.bypostauthor {} -ol.commentlist li.byuser {} -ol.commentlist li.comment-author-admin {} -ol.commentlist li.comment {border-bottom: 1px dotted #666; padding: 10px;} -ol.commentlist li.comment div.comment-author {} -ol.commentlist li.comment div.vcard {} -ol.commentlist li.comment div.vcard cite.fn {font-style: normal;} -ol.commentlist li.comment div.vcard cite.fn a.url {} -ol.commentlist li.comment div.vcard img.avatar {float:right; margin: 0 0 10px 10px;} -ol.commentlist li.comment div.vcard img.avatar-32 {} -ol.commentlist li.comment div.vcard img.photo {} -ol.commentlist li.comment div.vcard span.says {} -ol.commentlist li.comment div.commentmetadata {} -ol.commentlist li.comment div.comment-meta {font-size: 10px;} -ol.commentlist li.comment div.comment-meta a {color: #ccc;} -ol.commentlist li.comment p {} -ol.commentlist li.comment ul {} -ol.commentlist li.comment div.reply {font-size: 11px;} -ol.commentlist li.comment div.reply a {font-weight: bold;} -ol.commentlist li.comment ul.children {list-style: none; margin: 10px 0 0;} -ol.commentlist li.comment ul.children li {} -ol.commentlist li.comment ul.children li.alt {} -ol.commentlist li.comment ul.children li.bypostauthor {} -ol.commentlist li.comment ul.children li.byuser {} -ol.commentlist li.comment ul.children li.comment {} -ol.commentlist li.comment ul.children li.comment-author-admin {} -ol.commentlist li.comment ul.children li.depth-2 {border-left: 5px solid #555; margin: 0 0 10px 10px;} -ol.commentlist li.comment ul.children li.depth-3 {border-left: 5px solid #999; margin: 0 0 10px 10px;} -ol.commentlist li.comment ul.children li.depth-4 {border-left: 5px solid #bbb; margin: 0 0 10px 10px;} -ol.commentlist li.comment ul.children li.depth-5 {} -ol.commentlist li.comment ul.children li.odd {} -ol.commentlist li.even {background: #fff;} -ol.commentlist li.odd {background: #f6f6f6;} -ol.commentlist li.parent {border-left: 5px solid #111;} -ol.commentlist li.thread-alt {} -ol.commentlist li.thread-even {} -ol.commentlist li.thread-odd {} - /* Print styles! -------------------------------------------------------------------------------*/ @@ -117,16 +54,8 @@ ol.commentlist li.thread-odd {} /* Media queries! -------------------------------------------------------------------------------*/ -/* Consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/ - -@media screen and (max-device-width: 480px) { +/* Always do mobile-first, and consider using em units: http://blog.cloudfour.com/the-ems-have-it-proportional-media-queries-ftw -} - -@media all and (orientation: portrait) { - -} +@media screen and (min-width: 480px) { -@media all and (orientation: landscape) { - } */