WordPress.org

Make WordPress Core

Ticket #17809: 17809-nav-arrows.diff

File 17809-nav-arrows.diff, 2.0 KB (added by iandstewart, 7 years ago)

Make sure nav arrows are wrapped in spans so font-weight can be reset, preventing the noted display issue in Windows browsers, while refactoring the single.php nav CSS to prevent a Webkit bug that the spans introduced

  • wp-content/themes/twentyeleven/style.css

     
    16861686        text-align: right;
    16871687        width: 50%;
    16881688}
     1689#content nav .meta-nav {
     1690        font-weight: normal;
     1691}
    16891692
    16901693/* Singular navigation */
    16911694#nav-single {
    1692         display: inline-block;
    1693         overflow: visible !important;
    1694         position: absolute;
    1695         top: -4px;
    1696         right: 0;
     1695        float: right;
     1696        position: relative;
     1697                top: -0.3em;
     1698        text-align: right;
     1699        width: 100%;
    16971700        z-index: 1;
    16981701}
    16991702#nav-single .nav-previous,
  • wp-content/themes/twentyeleven/single.php

     
    1616
    1717                                        <nav id="nav-single">
    1818                                                <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
    19                                                 <span class="nav-previous"><?php previous_post_link( '%link', __( '&larr; Previous', 'twentyeleven' ) ); ?></span>
    20                                                 <span class="nav-next"><?php next_post_link( '%link', __( 'Next &rarr;', 'twentyeleven' ) ); ?></span>
     19                                                <span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">&larr;</span> Previous', 'twentyeleven' ) ); ?></span>
     20                                                <span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></span>
    2121                                        </nav><!-- #nav-single -->
    2222
    2323                                        <?php get_template_part( 'content', 'single' ); ?>
  • wp-content/themes/twentyeleven/rtl.css

     
    270270
    271271/* Singular navigation */
    272272#nav-single {
    273         left: 0;
    274         right: auto;
     273        float: left;
     274        text-align: left;
    275275}
    276276#nav-single .nav-next {
    277277        padding-right: .5em;