Skip to content

Commit

Permalink
Merge pull request milohuang#10 from stechico/master
Browse files Browse the repository at this point in the history
Updates from Foundation, and solve some W3C errors (from stechico)
  • Loading branch information
milohuang committed Dec 17, 2011
2 parents 321323b + 08fe9d3 commit 8cf5544
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
22 changes: 20 additions & 2 deletions css/foundation.css
Expand Up @@ -926,6 +926,17 @@ div.slider-nav span.left {
.column, .columns { width: auto !important; float: none; margin-left: 0px; margin-right: 0px; padding-left: 20px; padding-right: 20px; }
.column:last-child, .columns:last-child { margin-right: 0px; }
.offset-by-one, .offset-by-two, .offset-by-three, .offset-by-four, .offset-by-five, .offset-by-six, .offset-by-seven, .offset-by-eight, .offset-by-nine, .offset-by-ten, .offset-by-eleven { margin-left: 0% !important; }

/* Mobile 4-column Grid */
.row .phone-one.column:first-child, .row .phone-two.column:first-child, .row .phone-three.column:first-child, .row .phone-four.column:first-child, .row .phone-one.columns:first-child, .row .phone-two.columns:first-child, .row .phone-three.columns:first-child, .row .phone-four.columns:first-child { margin-left: 0; }

.row .phone-one.column, .row .phone-two.column, .row .phone-three.column, .row .phone-four.column,
.row .phone-one.columns, .row .phone-two.columns, .row .phone-three.columns, .row .phone-four.columns { margin-left: 4.4%; float: left; min-height: 1px; position: relative; padding: 0; }

.row .phone-one.columns { width: 21.68% !important; }
.row .phone-two.columns { width: 47.8% !important; }
.row .phone-three.columns { width: 73.9% !important; }
.row .phone-four.columns { width: 100% !important; }
}


Expand Down Expand Up @@ -982,12 +993,19 @@ div.slider-nav span.left {

@media only screen and (max-width: 767px) {
div.form-field input, div.form-field input.small, div.form-field input.medium, div.form-field input.large, div.form-field input.oversize, input.input-text, input.input-text.oversize, textarea,
form.nice div.form-field input, form.nice div.form-field input.oversize, form.nice input.input-text, form.nice input.input-text.oversize, form.nice textarea { display: block; width: 96%; padding: 6px 2% 4px; font-size: 18px; }
form.nice div.form-field input, form.nice div.form-field input.oversize, form.nice input.input-text, form.nice input.input-text.oversize, form.nice textarea { -webkit-border-radius: 2px; -moz-border-radius: 2px; }
form.nice div.form-field input, form.nice div.form-field input.oversize, form.nice input.input-text, form.nice input.input-text.oversize, form.nice textarea,input[type="text"].nice { display: block; width: 96%; padding: 6px 2% 4px; font-size: 18px; }
form.nice div.form-field input, form.nice div.form-field input.oversize, form.nice input.input-text, form.nice input.input-text.oversize, form.nice textarea, input[type="text"].nice { -webkit-border-radius: 2px; -moz-border-radius: 2px; }
form.nice div.form-field.error small, form.nice small.error { padding: 6px 2%; display: block; }
form.nice div.form-field.error .small + small, form.nice .small + .error { width: auto; }
form.nice div.form-field.error .medium + small, form.nice .medium + .error { width: auto; }
form.nice div.form-field.error .large + small, form.nice .large + .error { width: auto; }
input[type="submit"],input[type="reset"] {
width: 100%;
}
fieldset {
background: #F1F1F1;
margin-bottom: 20px;
}
}


Expand Down
6 changes: 5 additions & 1 deletion functions.php
Expand Up @@ -127,7 +127,7 @@ function start_el(&$output, $item, $depth, $args)
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );
$class_names = ' class="'. esc_attr( $class_names ) . '"';

$output .= $indent . '<dd id="menu-item-'. $item->ID . '"' . $value . $class_names .'>';
$output .= $indent . '<dd id="menu-item-'. $item->ID . '-dd"' . $value . $class_names .'>';

$attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : '';
$attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : '';
Expand All @@ -152,6 +152,10 @@ function start_el(&$output, $item, $depth, $args)

$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
}

function end_el(&$output, $item, $depth) {
$output .= "</dd>\n";
}
}

// img unautop, Courtesy of Interconnectit http://interconnectit.com/2175/how-to-remove-p-tags-from-images-in-wordpress/
Expand Down
23 changes: 21 additions & 2 deletions style.css
Expand Up @@ -68,10 +68,13 @@ License URI: http://www.opensource.org/licenses/mit-license.php
/* Add Align Class for Images */
img.alignright { float: right; margin: 0 0 18px 18px; }
img.alignleft { float: left; margin: 0 18px 18px 0; }
img.aligncenter { display: block; margin: 18px auto; }

/* Add HTML5 Caption Class for Images */
figure.figure { background: #EEE; margin: 0 0 18px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block; }
figure.figure figcaption { display: block; padding: 8px 10px; font-size: 13px; line-height: 18px; color: #555; }
figure.figure { background: #EEE; margin: 0 0 18px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: table; border-spacing: 10px; width: 1%; }
figure.figure figcaption { font-size: 13px; line-height: 18px; color: #555; }
figure.figure img { max-width: inherit; }
figure.figure img, figure.figure figcaption { display: table-row; }
figure.alignright.figure { float: right; margin: 0 0 18px 18px; }
figure.alignleft.figure { float: left; margin: 0 18px 18px 0; }

Expand All @@ -82,6 +85,22 @@ License URI: http://www.opensource.org/licenses/mit-license.php
.footer-section { padding-bottom: 10px; padding-top: 20px; font-size: 1.3rem; font-weight: normal; }
.footer-nav li { display: block; float: right; padding-left: 3%; margin-bottom: 0; }

@media only screen and (max-width: 767px) {
ul.footer-nav.mobile, dl.nav.mobile { width: auto; margin: 20px -20px 40px; height: auto; border-bottom: 1px solid #ccc; }
ul.footer-nav.mobile li { float: none; height: auto; padding-right: 0; }
dl.nav.mobile dt { display: none; }
dl.nav.mobile dd { float: none; height: auto; }
ul.footer-nav.mobile li a:hover { background-color: #eee; }
ul.footer-nav.mobile li a, dl.nav.mobile dd a { display: block; width: auto; height: auto; padding: 18px 20px; line-height: 1; border: solid 0 #ccc; border-width: 1px 0 0; margin: 0; color: #555; font-size: 15px; font-size: 1.5rem; -webkit-background-clip: padding-box; /* fix WebKit background bleed on border-radius */
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
ul.footer-nav.mobile li a.active, dl.nav.mobile dd a.active { height: auto; margin: 0; border-width: 1px 0 0; }

ul.footer-nav.mobile li.current-menu-item a, dl.nav.mobile dd.current-menu-item a, .nice.tabs.mobile dd.current-menu-item a { border: none; background: #00a6fc; color: #fff; margin: 0; position: static; top: 0px; height: auto; }
}

/* -------------------------------------------------------
Customize Foundation Style Pagination for WP-Pagenavi
---------------------------------------------------- */
Expand Down

0 comments on commit 8cf5544

Please sign in to comment.