Skip to content

Commit

Permalink
adding support for the 1140px grid
Browse files Browse the repository at this point in the history
  • Loading branch information
retlehs committed Apr 15, 2011
1 parent 4e99ef0 commit 1a1b5d7
Show file tree
Hide file tree
Showing 9 changed files with 1,031 additions and 38 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## Changelog:

### 3.2.0: April 15th, 2011

<ul>
<li>Added support for the 1140px Grid</li>
<li>Updated the conditional comment code to match latest changes to HTML5 Boilerplate</li>
</ul>

#### Contributors
[John Liuti](http://twitter.com/JohnLiuti)

### 3.1.1: April 7th, 2011

<ul>
Expand Down
130 changes: 130 additions & 0 deletions css/1140/1140.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
/* CSS Resets */

html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,address,cite,code,del,dfn,em,img,ins,q,small,strong,sub,sup,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{border:0;margin:0;padding:0}article,aside,figure,figure img,figcaption,hgroup,footer,header,nav,section,video,object{display:block}a img{border:0}figure{position:relative}figure img{width:100%}


/* ==================================================================================================================== */
/* ! The 1140px Grid V2 by Andy Taylor \ http://cssgrid.net \ http://www.twitter.com/andytlr \ http://www.andytlr.com */
/* ==================================================================================================================== */

.container {
padding-left: 20px;
padding-right: 20px;
}

.row {
width: 100%;
max-width: 1140px;
min-width: 755px;
margin: 0 auto;
overflow: hidden;
}

.onecol, .twocol, .threecol, .fourcol, .fivecol, .sixcol, .sevencol, .eightcol, .ninecol, .tencol, .elevencol {
margin-right: 3.8%;
float: left;
min-height: 1px;
}

.row .onecol {
width: 4.85%;
}

.row .twocol {
width: 13.45%;
}

.row .threecol {
width: 22.05%;
}

.row .fourcol {
width: 30.75%;
}

.row .fivecol {
width: 39.45%;
}

.row .sixcol {
width: 48%;
}

.row .sevencol {
width: 56.75%;
}

.row .eightcol {
width: 65.4%;
}

.row .ninecol {
width: 74.05%;
}

.row .tencol {
width: 82.7%;
}

.row .elevencol {
width: 91.35%;
}

.row .twelvecol {
width: 100%;
float: left;
}

.last {
margin-right: 0px;
}

img, object, embed {
max-width: 100%;
}

img {
height: auto;
}


/* Smaller screens */

@media only screen and (max-width: 1023px) {

body {
font-size: 0.8em;
line-height: 1.5em;
}

}


/* Mobile */

@media handheld, only screen and (max-width: 767px) {

body {
font-size: 16px;
-webkit-text-size-adjust: none;
}

.row, body, .container {
width: 100%;
min-width: 0;
margin-left: 0px;
margin-right: 0px;
padding-left: 0px;
padding-right: 0px;
}

.row .onecol, .row .twocol, .row .threecol, .row .fourcol, .row .fivecol, .row .sixcol, .row .sevencol, .row .eightcol, .row .ninecol, .row .tencol, .row .elevencol, .row .twelvecol {
width: auto;
float: none;
margin-left: 0px;
margin-right: 0px;
padding-left: 20px;
padding-right: 20px;
}

}
43 changes: 43 additions & 0 deletions css/1140/ie.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.onecol {
width: 4.7%;
}

.twocol {
width: 13.2%;
}

.threecol {
width: 22.05%;
}

.fourcol {
width: 30.6%;
}

.fivecol {
width: 39%;
}

.sixcol {
width: 48%;
}

.sevencol {
width: 56.75%;
}

.eightcol {
width: 61.6%;
}

.ninecol {
width: 74.05%;
}

.tencol {
width: 82%;
}

.elevencol {
width: 91.35%;
}
18 changes: 9 additions & 9 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--------------------------------------------------------------------------------------------------------------------------------------------------- */
/* Typography */
html { overflow-y: scroll; }
body { background: #fff; }
body { background: #fff; font-family: sans-serif; }

a { color: #06c; }
a:hover, a:focus { color:#09f; }
Expand Down Expand Up @@ -58,10 +58,8 @@ a:link { -webkit-tap-highlight-color: #3399FF; }
}

/* Forms */
input, select, textarea { font-family: sans-serif; font-size: 1em; }
button, input, select, textarea { margin: 0; }
button, input, select, textarea { width: auto; overflow: visible; margin: 0; font-family: sans-serif; font-size: 1em; }
label, input[type=button], input[type=submit], button { cursor: pointer; }
button { width: auto; overflow: visible; }
textarea { overflow: auto; }

/* Grid */
Expand All @@ -70,7 +68,8 @@ textarea { overflow: auto; }

/* HEADER
--------------------------------------------------------------------------------------------------------------------------------------------------- */
#banner { position: relative; margin: 16px auto; z-index: 1000; }
#banner { position: relative; margin: 16px auto 0; z-index: 1000; }
#banner .container { padding: 0; }

#logo { float: left; width: 300px; height: 75px; margin: 0 0 16px; padding: 0; }

Expand All @@ -82,7 +81,7 @@ textarea { overflow: auto; }
background-image: linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
position: relative;
list-style: none;
margin: 0;
margin: 0 0 16px 0;
padding: 0;
float: left;
width: 100%;
Expand Down Expand Up @@ -150,9 +149,10 @@ textarea { overflow: auto; }
/* CONTENT
--------------------------------------------------------------------------------------------------------------------------------------------------- */
#content { margin-bottom: 24px; }
#content .container { width: auto; position: relative; }
#content .container { width: auto; position: relative; padding: 0; }

#main { position: relative; }
#main .container { padding: 0; }

/* Posts */
.hentry header { margin-bottom: 1.5em; }
Expand Down Expand Up @@ -202,15 +202,15 @@ figure.gallery-item figcaption { display: none; }

/* Primary Sidebar */
#sidebar { position: relative; }
#sidebar .container { width: auto; }
#sidebar .container { width: auto; padding: 0; }
#sidebar .widget { clear: both; margin-bottom: 1.5em; }
#sidebar .widget .gform_wrapper ul { padding: 0; list-style-type: none; }


/* FOOTER
--------------------------------------------------------------------------------------------------------------------------------------------------- */
#content-info { clear: both; position: relative; }
#content-info > .container { padding-bottom: 1.5em; }
#content-info > .container { padding: 0 0 1.5em; }

#content-info ul.menu { margin: 0 0 24px; padding: 0; list-style-type: none; }
#content-info ul.menu li { display: inline; margin-right: 1em; }
Expand Down
12 changes: 9 additions & 3 deletions footer.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php if (get_option('roots_css_framework') === '1140') { ?>
</div><!-- /.row -->
<div class="row">
<?php } ?>
<footer id="content-info" class="<?php echo roots_container_class; ?>" role="contentinfo">
<div class="container">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Footer") ) : ?>
Expand All @@ -23,10 +27,12 @@
<a class="email" href="mailto:<?php echo get_option('roots_vcard_email'); ?>"><?php echo get_option('roots_vcard_email'); ?></a>
</p>
<?php } ?>

</div>
</div>
</footer>
<?php if (get_option('roots_css_framework') === '1140') { ?>
</div><!-- /.row -->
<?php } ?>
</div><!-- /#wrap -->
<?php wp_footer(); ?>
</body>
</html>
</html>
51 changes: 32 additions & 19 deletions functions.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

//get active theme directory name (lets you rename roots)
// get active theme directory name (lets you rename roots)
$theme_name = next(explode('/themes/', get_template_directory()));

include_once('includes/roots-activation.php'); // activation
Expand All @@ -16,39 +16,36 @@
switch ($roots_css_framework) {
case 'blueprint':
define('roots_container_class', 'span-24');
define('is_960gs', false);
case '960gs_12':
define('roots_container_class', 'container_12');
define('is_960gs', true);
define('is_960gs_12', true);
case '960gs_16':
define('roots_container_class', 'container_16');
define('is_960gs', true);
define('is_960gs_16', true);
case '960gs_24':
define('roots_container_class', 'container_24');
define('is_960gs', true);
define('is_960gs_24', true);
case '1140':
define('roots_container_class', 'container');
default:
define('roots_container_class', '');
define('is_960gs', false);
}
}

function get_roots_css_framework_stylesheets() {
function get_roots_stylesheets() {
$roots_css_framework = get_option('roots_css_framework');
$css_uri = get_stylesheet_directory_uri();
$styles = '';

if (!is_960gs) {
if ($roots_css_framework === 'blueprint') {
$styles .= "<link rel=\"stylesheet\" href=\"$css_uri/css/blueprint/screen.css\">\n";
} elseif (is_960gs_12 == 1 || is_960gs_16 == 1) {
} elseif ($roots_css_framework === '960gs_12' || $roots_css_framework === '960gs_16') {
$styles .= "<link rel=\"stylesheet\" href=\"$css_uri/css/960/reset.css\">\n";
$styles .= "\t<link rel=\"stylesheet\" href=\"$css_uri/css/960/text.css\">\n";
$styles .= "\t<link rel=\"stylesheet\" href=\"$css_uri/css/960/960.css\">\n";
} elseif (is_960gs_24 == 1) {
} elseif ($roots_css_framework === '960gs_24') {
$styles .= "<link rel=\"stylesheet\" href=\"$css_uri/css/960/reset.css\">\n";
$styles .= "\t<link rel=\"stylesheet\" href=\"$css_uri/css/960/text.css\">\n";
$styles .= "\t<link rel=\"stylesheet\" href=\"$css_uri/css/960/960_24_col.css\">\n";
} elseif ($roots_css_framework === '1140') {
$styles .= "<link rel=\"stylesheet\" href=\"$css_uri/css/1140/1140.css\">\n";
}

if (class_exists('RGForms')) {
Expand All @@ -57,16 +54,32 @@ function get_roots_css_framework_stylesheets() {

$styles .= "\t<link rel=\"stylesheet\" href=\"$css_uri/css/style.css\">\n";

if (!is_960gs) {
$styles .= "\t<!--[if lt IE 8]>i<link rel=\"stylesheet\" href=\"$css_uri/css/blueprint/ie.css\"><![endif]-->\n";
if ($roots_css_framework === 'blueprint') {
$styles .= "\t<!--[if lt IE 8]><link rel=\"stylesheet\" href=\"$css_uri/css/blueprint/ie.css\"><![endif]-->\n";
} elseif ($roots_css_framework === '1140') {
$styles .= "\t<!--[if lt IE 8]><link rel=\"stylesheet\" href=\"$css_uri/css/1140/ie.css\"><![endif]-->\n";
}

return $styles;
return $styles;
}

// set the maximum 'Large' image width to the Blueprint grid maximum width
if (!isset($content_width)) $roots_selected_css_framework === 'blueprint' ? $content_width = 950 : $content_width = 940;

// set the maximum 'Large' image width to the maximum grid width
if (!isset($content_width)) {
switch ($roots_css_framework) {
case 'blueprint' :
$content_width = 950;
case '960gs_12' :
$content_width = 940;
case '960gs_16' :
$content_width = 940;
case '960gs_24' :
$content_width = 940;
case '1140' :
$content_width = 1140;
default :
$content_width = 950;
}
}
// tell the TinyMCE editor to use editor-style.css
// if you have issues with getting the editor to show your changes then use the following line:
// add_editor_style('editor-style.css?' . time());
Expand Down
Loading

0 comments on commit 1a1b5d7

Please sign in to comment.