Merge pull request #166 from iamtakashi/input-type-search

Change the search form text input to search type along with basic styling for search type inputs.
This commit is contained in:
Philip Arthur Moore 2013-02-27 12:51:51 -08:00
commit 6917268595
2 changed files with 5 additions and 2 deletions

View File

@ -8,6 +8,6 @@
?> ?>
<form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search"> <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
<label for="s" class="assistive-text"><?php _e( 'Search', '_s' ); ?></label> <label for="s" class="assistive-text"><?php _e( 'Search', '_s' ); ?></label>
<input type="text" class="field" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" id="s" placeholder="<?php esc_attr_e( 'Search &hellip;', '_s' ); ?>" /> <input type="search" class="field" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" id="s" placeholder="<?php esc_attr_e( 'Search &hellip;', '_s' ); ?>" />
<input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', '_s' ); ?>" /> <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', '_s' ); ?>" />
</form> </form>

View File

@ -282,6 +282,7 @@ input::-moz-focus-inner { /* Corrects inner padding and border displayed oddly i
input[type=text], input[type=text],
input[type=email], input[type=email],
input[type=password], input[type=password],
input[type=search],
textarea { textarea {
color: #666; color: #666;
border: 1px solid #ccc; border: 1px solid #ccc;
@ -290,12 +291,14 @@ textarea {
input[type=text]:focus, input[type=text]:focus,
input[type=email]:focus, input[type=email]:focus,
input[type=password]:focus, input[type=password]:focus,
input[type=search]:focus,
textarea:focus { textarea:focus {
color: #111; color: #111;
} }
input[type=text], input[type=text],
input[type=email], input[type=email],
input[type=password] { input[type=password],
input[type=search] {
padding: 3px; padding: 3px;
} }
textarea { textarea {