[Support request] Safari / iPhone search positioning bug

Home Forums Support [Support request] Safari / iPhone search positioning bug

Home Forums Support Safari / iPhone search positioning bug

  • This topic has 1 reply, 2 voices, and was last updated 5 years ago by David.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #869998
    D

    When opening the search box to type in a search on the iPhone or Safari on a Mac, the placeholder and search text is out of alignment.

    https://pasteboard.co/IakIGWN.png

    Not sure if this is a bug or if I have to fix CSS – I’ve combined the code below from a couple other threads.

    This is the CSS I currently have customized for search:

    .navigation-search input {
    opacity: 1;
    height: 70px;
    }
    .navigation-search input[type=”search”], .navigation-search input[type=”search”]:active {
    color: #f3879d;
    background-color: #fff;
    border-top: 1px solid lightgrey;
    border-bottom: 1px solid lightgrey;
    font-size: 24px;
    }
    .navigation-search input[type=”search”]:focus {
    color: #f3879d;
    background-color: #fff;
    }

    And here is the code to customize the search bar:

    <?php
    add_filter( ‘generate_navigation_search_output’, function() {
    return sprintf( // WPCS: XSS ok, sanitization ok.
    ‘<form method=”get” class=”search-form navigation-search” action=”%1$s”>
    <input type=”search” placeholder=”Search for a recipe…” class=”search-field” value=”%2$s” name=”s” title=”%3$s” />
    </form>’,
    esc_url( home_url( ‘/’ ) ),
    esc_attr( get_search_query() ),
    esc_attr_x( ‘Search’, ‘label’, ‘generatepress’ )
    );
    } );
    ?>

    #870262
    David
    Staff
    Customer Support

    Hi there,

    try adding this CSS:

    .navigation-search input {
        line-height: 1;
    }
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.