[wp-trac] [WordPress Trac] #23152: Twenty Twelve: Excessive CSS classes in functions.php
WordPress Trac
noreply at wordpress.org
Tue Jan 8 22:34:06 UTC 2013
#23152: Twenty Twelve: Excessive CSS classes in functions.php
-----------------------------+---------------------------
Reporter: TomasM | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Bundled Theme
Version: 3.5 | Severity: normal
Keywords: dev-feedback |
-----------------------------+---------------------------
There is navigation part in twentytwelve_content_nav function:
{{{
<nav id="<?php echo $html_id; ?>" class="navigation"
role="navigation">
<h3 class="assistive-text"><?php _e( 'Post
navigation', 'twentytwelve' ); ?></h3>
<div class="nav-previous alignleft"><?php
next_posts_link( __( '<span class="meta-nav">←</span> Older posts',
'twentytwelve' ) ); ?></div>
<div class="nav-next alignright"><?php
previous_posts_link( __( 'Newer posts <span class="meta-
nav">→</span>', 'twentytwelve' ) ); ?></div>
</nav><!-- #<?php echo $html_id; ?> .navigation -->
}}}
We do not need CSS classes .alignleft and .alignright here, because the
.nav-previous and .nav-next already have float properties in style.css. In
one case this made the links appear in different lines while constructing
the child theme. Although it didn't affect vanilla Twenty Twelve. The code
could be just:
{{{
<nav id="<?php echo $html_id; ?>" class="navigation"
role="navigation">
<h3 class="assistive-text"><?php _e( 'Post
navigation', 'twentytwelve' ); ?></h3>
<div class="nav-previous"><?php next_posts_link(
__( '<span class="meta-nav">←</span> Older posts', 'twentytwelve' )
); ?></div>
<div class="nav-next"><?php previous_posts_link(
__( 'Newer posts <span class="meta-nav">→</span>', 'twentytwelve' )
); ?></div>
</nav><!-- #<?php echo $html_id; ?> .navigation -->
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23152>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list