Cleaning up

This commit is contained in:
Mike Francis 2013-01-17 21:31:29 +00:00
parent f656e942da
commit 86229fed44
3 changed files with 148 additions and 74 deletions

View File

@ -5,7 +5,7 @@ A lightweight, skeletal, responsive WordPress boilerplate theme for HTML5 and be
## Features ## Features
* Reset, normalisation and base font/form styles * Reset, normalisation and base font/form styles
* Responsive elements, mobile/tablet ready * Build for mobile first, expanding to 1200px (can be extended further)
* Built using SASS - semantically named files all compiled into a single file * Built using SASS - semantically named files all compiled into a single file
* Includes Google HTML5 shiv * Includes Google HTML5 shiv
* Semantic use of HTML5 elements * Semantic use of HTML5 elements

View File

@ -18,7 +18,6 @@
} }
@mixin col-width ($span: 1) { @mixin col-width ($span: 1) {
//width: ((($container-width / $column-count) * $span) - $column-gutter) / $container-width * 100%;
width: ((100 / $column-count) * $span) - ($column-gutter / $container-max-width) * 100%; width: ((100 / $column-count) * $span) - ($column-gutter / $container-max-width) * 100%;
} }

219
style.css
View File

@ -5,173 +5,232 @@ Author: Mike Francis
*/ */
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td { body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
margin: 0; margin: 0;
padding: 0; } padding: 0;
}
table { table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; } border-spacing: 0;
}
fieldset, img { fieldset, img {
border: 0; } border: 0;
}
address, caption, cite, dfn, th, var { address, caption, cite, dfn, th, var {
font-style: normal; font-style: normal;
font-weight: normal; } font-weight: normal;
}
caption, th { caption, th {
text-align: left; } text-align: left;
}
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
font-size: 100%; font-size: 100%;
font-weight: bold; } font-weight: bold;
}
q:before, q:after { q:before, q:after {
content: ''; } content: '';
}
abbr, acronym { abbr, acronym {
border: 0; } border: 0;
}
html { html {
background-color: white; background-color: white;
color: #333333; color: #333333;
font: 0.875em/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; } font: 0.875em/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
}
h1, h2, h3, h4, h5, h6, p, ul, ol, table, pre, fieldset { h1, h2, h3, h4, h5, h6, p, ul, ol, table, pre, fieldset {
margin-bottom: 21px; } margin-bottom: 21px;
}
h1 { h1 {
font-size: 2em; font-size: 2em;
line-height: 0.75em; } line-height: 0.75em;
}
h2 { h2 {
font-size: 1.71429em; font-size: 1.71429em;
line-height: 0.875em; } line-height: 0.875em;
}
h3 { h3 {
font-size: 1.5em; font-size: 1.5em;
line-height: 1em; } line-height: 1em;
}
h4 { h4 {
font-size: 1.28571em; font-size: 1.28571em;
line-height: 1.16667em; } line-height: 1.16667em;
}
h5 { h5 {
font-size: 1.14286em; font-size: 1.14286em;
line-height: 1.3125em; } line-height: 1.3125em;
}
h6 { h6 {
font-size: 1.14286em; font-size: 1.14286em;
line-height: 1.3125em; } line-height: 1.3125em;
}
ul, ol { ul, ol {
margin-left: 24px; } margin-left: 24px;
}
ul ul, ol ol { ul ul, ol ol {
margin-bottom: 0; } margin-bottom: 0;
}
img { img {
display: block; display: block;
max-width: 100%; max-width: 100%;
height: auto; } height: auto;
}
.alignleft { .alignleft {
float: left; } float: left;
}
img.alignleft { img.alignleft {
margin-right: 20px; } margin-right: 20px;
}
.alignright { .alignright {
float: right; } float: right;
}
img.alignright { img.alignright {
margin-left: 20px; } margin-left: 20px;
}
.aligncenter { .aligncenter {
display: block; display: block;
margin-left: auto; margin-left: auto;
margin-right: auto; } margin-right: auto;
}
.clearfix, .container, .row, .controls { .clearfix, .container, .row, .controls {
*zoom: 1; } *zoom: 1;
.clearfix:before, .container:before, .row:before, .controls:before, .clearfix:after, .container:after, .row:after, .controls:after { }
content: " "; .clearfix:before, .container:before, .row:before, .controls:before, .clearfix:after, .container:after, .row:after, .controls:after {
display: table; } content: " ";
.clearfix:after, .container:after, .row:after, .controls:after { display: table;
clear: both; } }
.clearfix:after, .container:after, .row:after, .controls:after {
clear: both;
}
.container { .container {
padding: 0 40px; padding: 0 40px;
max-width: 1200px; max-width: 1200px;
margin: 0 auto; } margin: 0 auto;
}
@media (min-width: 768px) { @media (min-width: 768px) {
.row { .row {
margin-left: -1.66667%; } } margin-left: -1.66667%;
}
}
.col { .col {
display: block; display: block;
float: none; float: none;
width: auto; } width: auto;
@media (min-width: 768px) { }
.col { @media (min-width: 768px) {
float: left; .col {
margin-left: 1.66667%; } } float: left;
margin-left: 1.66667%;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.col1 { .col1 {
width: 6.66667%; } } width: 6.66667%;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.col2 { .col2 {
width: 15.0%; } } width: 15.0%;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.col3 { .col3 {
width: 23.33333%; } } width: 23.33333%;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.col4 { .col4 {
width: 31.66667%; } } width: 31.66667%;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.col5 { .col5 {
width: 40.0%; } } width: 40.0%;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.col6 { .col6 {
width: 48.33333%; } } width: 48.33333%;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.col7 { .col7 {
width: 56.66667%; } } width: 56.66667%;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.col8 { .col8 {
width: 65%; } } width: 65%;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.col9 { .col9 {
width: 73.33333%; } } width: 73.33333%;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.col10 { .col10 {
width: 81.66667%; } } width: 81.66667%;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.col11 { .col11 {
width: 90%; } } width: 90%;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.col12 { .col12 {
width: 98.33333%; } } width: 98.33333%;
}
}
.nav { .nav {
list-style: none; list-style: none;
margin-left: 0; } margin-left: 0;
}
.nav > li, .nav > li > a { .nav > li, .nav > li > a {
display: inline-block; display: inline-block;
*display: inline; } *display: inline;
}
.nav-list { .nav-list {
border: solid 1px #dddddd; border: solid 1px #dddddd;
@ -181,43 +240,53 @@ img.alignright {
border-radius: 5px; border-radius: 5px;
-webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1); } box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
}
.nav-list > li, .nav-list > li > a { .nav-list > li, .nav-list > li > a {
display: block; } display: block;
}
.nav-list > li { .nav-list > li {
border-bottom: solid 1px #dddddd; } border-bottom: solid 1px #dddddd;
}
.nav-list > li:last-child { .nav-list > li:last-child {
border-bottom: none; } border-bottom: none;
}
.nav-list > li > a { .nav-list > li > a {
padding: 10px; padding: 10px;
-webkit-transition: all 0.2s ease-out; -webkit-transition: all 0.2s ease-out;
-moz-transition: all 0.2s ease-out; -moz-transition: all 0.2s ease-out;
transition: all 0.2s ease-out; } transition: all 0.2s ease-out;
}
.nav-list > li > a:hover { .nav-list > li > a:hover {
background-color: #fafafa; } background-color: #fafafa;
}
.table { .table {
width: 100%; width: 100%;
border-collapse: collapse; } border-collapse: collapse;
}
.table th, .table th,
.table td { .table td {
text-align: left; text-align: left;
vertical-align: top; vertical-align: top;
border-top: 1px solid #dddddd; border-top: 1px solid #dddddd;
padding: 10.5px 10px; } padding: 10.5px 10px;
}
.table th { .table th {
font-weight: bold; font-weight: bold;
border-top: 0; } border-top: 0;
}
.table thead th { .table thead th {
vertical-align: bottom; } vertical-align: bottom;
}
input, select, textarea, button { input, select, textarea, button {
display: inline-block; display: inline-block;
@ -234,17 +303,21 @@ input, select, textarea, button {
border-radius: 3px; border-radius: 3px;
margin-right: 5px; margin-right: 5px;
margin-bottom: -1px; margin-bottom: -1px;
width: 208px; } width: 208px;
}
.control-group { .control-group {
margin-bottom: 21px; } margin-bottom: 21px;
}
.control-label { .control-label {
float: left; float: left;
width: 140px; } width: 140px;
}
.controls { .controls {
margin-left: 160px; } margin-left: 160px;
}
.btn { .btn {
cursor: pointer; cursor: pointer;
@ -261,10 +334,12 @@ input, select, textarea, button {
background-image: -webkit-linear-gradient(white, #eeeeee); background-image: -webkit-linear-gradient(white, #eeeeee);
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(white), to(#eeeeee)); background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(white), to(#eeeeee));
background-image: -moz-linear-gradient(white, #eeeeee); background-image: -moz-linear-gradient(white, #eeeeee);
background-image: -o-linear-gradient(white, #eeeeee); } background-image: -o-linear-gradient(white, #eeeeee);
.btn:hover { }
background-color: #eeeeee; .btn:hover {
background-image: -webkit-linear-gradient(#eeeeee, white); background-color: #eeeeee;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#eeeeee), to(white)); background-image: -webkit-linear-gradient(#eeeeee, white);
background-image: -moz-linear-gradient(#eeeeee, white); background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#eeeeee), to(white));
background-image: -o-linear-gradient(#eeeeee, white); } background-image: -moz-linear-gradient(#eeeeee, white);
background-image: -o-linear-gradient(#eeeeee, white);
}