Skip to content

Commit

Permalink
Merge branch 'master' into feature-genericons
Browse files Browse the repository at this point in the history
* master:
  Link Travis build results
  Header: Made aria-controls refer to an ID instead of a class
  JSLint error
  Using best practices to apply the proper units to the font-size mixin. See http://sass-guidelin.es/#units
  Sanitize location.hash before passing it to getElementById
  Consistent navigation
  Removed duplicate b & strong styling, changed SASS files to make use of parent selector: _menu, _galleries, _buttons, _fields, and _elements.
  Remove duplicate CSS rules for `small` - refs Automattic#694
  • Loading branch information
danielwrobert committed Mar 10, 2015
2 parents 0b4243a + 68fb791 commit 7f8eb90
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 106 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Travis CI Build Status](https://travis-ci.org/Automattic/_s.svg?branch=master)
[![Build Status](https://travis-ci.org/Automattic/_s.svg?branch=master)](https://travis-ci.org/Automattic/_s)

_s
===
Expand Down
24 changes: 16 additions & 8 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@
</h2>

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-above" class="comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', '_s' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', '_s' ) ); ?></div>
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h2>
<div class="nav-links">

<div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', '_s' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments', '_s' ) ); ?></div>

</div><!-- .nav-links -->
</nav><!-- #comment-nav-above -->
<?php endif; // check for comment navigation ?>

Expand All @@ -48,10 +52,14 @@
</ol><!-- .comment-list -->

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-below" class="comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', '_s' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', '_s' ) ); ?></div>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h2>
<div class="nav-links">

<div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', '_s' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments', '_s' ) ); ?></div>

</div><!-- .nav-links -->
</nav><!-- #comment-nav-below -->
<?php endif; // check for comment navigation ?>

Expand Down
4 changes: 2 additions & 2 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
</div><!-- .site-branding -->

<nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle" aria-controls="menu" aria-expanded="false"><?php _e( 'Primary Menu', '_s' ); ?></button>
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php _e( 'Primary Menu', '_s' ); ?></button>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) ); ?>
</nav><!-- #site-navigation -->
</header><!-- #masthead -->

Expand Down
11 changes: 9 additions & 2 deletions js/skip-link-focus-fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@

if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) {
window.addEventListener( 'hashchange', function() {
var element = document.getElementById( location.hash.substring( 1 ) );
var id = location.hash.substring( 1 ),
element;

if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
return;
}

element = document.getElementById( id );

if ( element ) {
if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) {
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
element.tabIndex = -1;
}

Expand Down
10 changes: 5 additions & 5 deletions sass/elements/_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ body {
background: $color__background-body; /* Fallback for when there is no custom background color defined. */
}

blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}

blockquote, q {
quotes: "" "";

&:before,
&:after {
content: "";
}
}

hr {
Expand Down
27 changes: 9 additions & 18 deletions sass/forms/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,15 @@ input[type="submit"] {
line-height: 1;
padding: .6em 1em .4em;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
border-color: $color__border-button-hover;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 15px 17px rgba(255, 255, 255, 0.8), inset 0 -5px 12px rgba(0, 0, 0, 0.02);
}
&:hover {
border-color: $color__border-button-hover;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 15px 17px rgba(255, 255, 255, 0.8), inset 0 -5px 12px rgba(0, 0, 0, 0.02);
}

button:focus,
input[type="button"]:focus,
input[type="reset"]:focus,
input[type="submit"]:focus,
button:active,
input[type="button"]:active,
input[type="reset"]:active,
input[type="submit"]:active {
border-color: $color__border-button-focus;
box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5), inset 0 2px 5px rgba(0, 0, 0, 0.15);
&:active,
&:focus {
border-color: $color__border-button-focus;
box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5), inset 0 2px 5px rgba(0, 0, 0, 0.15);
}
}
11 changes: 3 additions & 8 deletions sass/forms/_fields.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,10 @@ textarea {
color: $color__text-input;
border: 1px solid $color__border-input;
border-radius: 3px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus {
color: $color__text-input-focus;
&:focus {
color: $color__text-input-focus;
}
}

input[type="text"],
Expand Down
48 changes: 24 additions & 24 deletions sass/media/_galleries.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,38 @@
text-align: center;
vertical-align: top;
width: 100%;
}

.gallery-columns-2 .gallery-item {
max-width: 50%;
}
.gallery-columns-2 & {
max-width: 50%;
}

.gallery-columns-3 .gallery-item {
max-width: 33.33%;
}
.gallery-columns-3 & {
max-width: 33.33%;
}

.gallery-columns-4 .gallery-item {
max-width: 25%;
}
.gallery-columns-4 & {
max-width: 25%;
}

.gallery-columns-5 .gallery-item {
max-width: 20%;
}
.gallery-columns-5 & {
max-width: 20%;
}

.gallery-columns-6 .gallery-item {
max-width: 16.66%;
}
.gallery-columns-6 & {
max-width: 16.66%;
}

.gallery-columns-7 .gallery-item {
max-width: 14.28%;
}
.gallery-columns-7 & {
max-width: 14.28%;
}

.gallery-columns-8 .gallery-item {
max-width: 12.5%;
}
.gallery-columns-8 & {
max-width: 12.5%;
}

.gallery-columns-9 .gallery-item {
max-width: 11.11%;
.gallery-columns-9 & {
max-width: 11.11%;
}
}

.gallery-caption {
Expand Down
4 changes: 2 additions & 2 deletions sass/mixins/_mixins-master.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Rem output with px fallback
@mixin font-size($sizeValue: 1) {
font-size: ($sizeValue * 16) + px;
font-size: $sizeValue + rem;
font-size: ($sizeValue * 16) * 1px;
font-size: $sizeValue * 1rem;
}

// Center block
Expand Down
37 changes: 18 additions & 19 deletions sass/navigation/_menus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,23 @@
}
}

.site-main .comment-navigation,
.site-main .posts-navigation,
.site-main .post-navigation {
margin: 0 0 1.5em;
overflow: hidden;
}
.comment-navigation,
.posts-navigation,
.post-navigation {

.comment-navigation .nav-previous,
.posts-navigation .nav-previous,
.post-navigation .nav-previous {
float: left;
width: 50%;
}
.site-main & {
margin: 0 0 1.5em;
overflow: hidden;
}

.comment-navigation .nav-next,
.posts-navigation .nav-next,
.post-navigation .nav-next {
float: right;
text-align: right;
width: 50%;
}
& .nav-previous {
float: left;
width: 50%;
}

& .nav-next {
float: right;
text-align: right;
width: 50%;
}
}
8 changes: 0 additions & 8 deletions sass/typography/_copy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ p {
margin-bottom: 1.5em;
}

b, strong {
font-weight: bold;
}

dfn, cite, em, i {
font-style: italic;
}
Expand Down Expand Up @@ -44,10 +40,6 @@ mark, ins {
text-decoration: none;
}

small {
font-size: 75%;
}

big {
font-size: 125%;
}
9 changes: 0 additions & 9 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,6 @@ p {
margin-bottom: 1.5em;
}

b,
strong {
font-weight: bold;
}

dfn,
cite,
em,
Expand Down Expand Up @@ -342,10 +337,6 @@ ins {
text-decoration: none;
}

small {
font-size: 75%;
}

big {
font-size: 125%;
}
Expand Down

0 comments on commit 7f8eb90

Please sign in to comment.