Making WordPress.org

Changeset 4551


Ignore:
Timestamp:
12/16/2016 08:04:12 PM (9 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Improve appearance and responsiveness of search bar.

  • Mirror appearance of search field rolling out in other w.org sites.
  • ...which is largely a switch from input[type="submit"] to button with search dashicon.
  • Add padding to ensure space around search field at smaller page widths.
Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss

    r4532 r4551  
    134134            width: 2.2rem;
    135135        }
    136     }
    137 
    138     main {
    139         font-size: 1.5rem;
    140136    }
    141137
     
    672668    }
    673669
    674     .section.search-section {
    675         padding-bottom: 0;
    676     }
    677 
    678670    .reference-landing .section.search-section {
    679671        padding-top: 0;
     
    734726        overflow: hidden;
    735727        height: auto;
    736         margin-bottom: 1em;
    737         input[type="text"], input[type="submit"] {
    738             height: 50px;
    739             height: 5rem;
    740             margin-bottom: 1em;
     728        position: relative;
     729        input[type="text"] {
     730            border-radius: 0;
     731            margin: 0 auto;
     732            padding: 0.5em;
    741733            width: 100%;
    742734        }
    743         input[type="submit"] {
    744             width: 85px;
    745             width: 8.5rem;
    746             float: left;
     735        .button-search {
     736            background: transparent;
     737            border: none;
     738            border-radius: 0;
     739            box-shadow: none;
     740            color: #32373c;
     741            display: block;
     742            height: 40px;
     743            padding: 0.5rem 1rem;
     744            position: absolute;
     745            right: 0;
     746            top: 0;
     747            text-shadow: none;
    747748        }
    748749        label {
     
    761762        }
    762763        .search-post-type {
     764            margin-top: 1em;
     765
    763766            label {
    764767                border-right: 1px solid #ccc;
     
    788791        max-width: 70rem;
    789792        margin: 0 auto;
    790         padding: 1.5em 0;
     793        padding: 1.5em 1em;
    791794    }
    792795
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/searchform.php

    r4242 r4551  
    4646
    4747    <form role="search" method="get" class="searchform<?php echo esc_attr( $form_class ); ?>" action="<?php echo esc_url( $search_url ); ?>">
    48         <div>
    49         <label>
    50             <label for="search-field" class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'wporg' ); ?></label>
    51             <input type="text" id="search-field" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'wporg' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s">
    52         </label>
    53         <input type="submit" class="shiny-blue search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'wporg' ); ?>">
    54         </div>
    55 
     48        <label for="search-field" class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'wporg' ); ?></label>
     49        <input type="text" id="search-field" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'wporg' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s">
     50        <button class="button button-primary button-search"><i class="dashicons dashicons-search"></i><span class="screen-reader-text"><?php _e( 'Search plugins', 'wporg' ); ?></span></button>
    5651    <?php if ( $filters ) : ?>
    5752
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css

    r4532 r4551  
    444444}
    445445
    446 .devhub-wrap main {
    447   font-size: 1.5rem;
    448 }
    449 
    450446.devhub-wrap a.button,
    451447.devhub-wrap button,
     
    10181014}
    10191015
    1020 .devhub-wrap .section.search-section {
    1021   padding-bottom: 0;
    1022 }
    1023 
    10241016.devhub-wrap .reference-landing .section.search-section {
    10251017  padding-top: 0;
     
    10841076  overflow: hidden;
    10851077  height: auto;
    1086   margin-bottom: 1em;
    1087 }
    1088 
    1089 .devhub-wrap .searchform input[type="text"], .devhub-wrap .searchform input[type="submit"] {
    1090   height: 50px;
    1091   height: 5rem;
    1092   margin-bottom: 1em;
     1078  position: relative;
     1079}
     1080
     1081.devhub-wrap .searchform input[type="text"] {
     1082  border-radius: 0;
     1083  margin: 0 auto;
     1084  padding: 0.5em;
    10931085  width: 100%;
    10941086}
    10951087
    1096 .devhub-wrap .searchform input[type="submit"] {
    1097   width: 85px;
    1098   width: 8.5rem;
    1099   float: left;
     1088.devhub-wrap .searchform .button-search {
     1089  background: transparent;
     1090  border: none;
     1091  border-radius: 0;
     1092  box-shadow: none;
     1093  color: #32373c;
     1094  display: block;
     1095  height: 40px;
     1096  padding: 0.5rem 1rem;
     1097  position: absolute;
     1098  right: 0;
     1099  top: 0;
     1100  text-shadow: none;
    11001101}
    11011102
     
    11151116.devhub-wrap .searchform div {
    11161117  overflow: auto;
     1118}
     1119
     1120.devhub-wrap .searchform .search-post-type {
     1121  margin-top: 1em;
    11171122}
    11181123
     
    11441149  max-width: 70rem;
    11451150  margin: 0 auto;
    1146   padding: 1.5em 0;
     1151  padding: 1.5em 1em;
    11471152}
    11481153
Note: See TracChangeset for help on using the changeset viewer.