Ticket #40331: 40331.themes.diff
File 40331.themes.diff, 8.7 KB (added by , 15 months ago) |
---|
-
src/js/_enqueues/wp/customize/controls.js
1917 1917 section.contentContainer.on( 'click', '.feature-filter-toggle', function( e ) { 1918 1918 var $themeContainer = $( '.customize-themes-full-container' ), 1919 1919 $filterToggle = $( e.currentTarget ); 1920 section.filtersHeight = $filterToggle.parent ().next( '.filter-drawer' ).height();1920 section.filtersHeight = $filterToggle.parents( '.themes-filter-bar' ).next( '.filter-drawer' ).height(); 1921 1921 1922 1922 if ( 0 < $themeContainer.scrollTop() ) { 1923 1923 $themeContainer.animate( { scrollTop: 0 }, 400 ); … … 1932 1932 .attr( 'aria-expanded', function( i, attr ) { 1933 1933 return 'true' === attr ? 'false' : 'true'; 1934 1934 }) 1935 .parent ().next( '.filter-drawer' ).slideToggle( 180, 'linear' );1935 .parents( '.themes-filter-bar' ).next( '.filter-drawer' ).slideToggle( 180, 'linear' ); 1936 1936 1937 1937 if ( $filterToggle.hasClass( 'open' ) ) { 1938 1938 var marginOffset = 1018 < window.innerWidth ? 50 : 76; -
src/wp-admin/css/customize-controls.css
1815 1815 bottom: 0; 1816 1816 } 1817 1817 1818 .themes-filter-bar .feature-filter-toggle {1819 float: right;1820 margin: 3px 0 3px 25px;1821 }1822 1823 1818 .themes-filter-bar .feature-filter-toggle:before { 1824 1819 content: "\f111"; 1825 1820 margin: 0 5px 0 0; … … 1880 1875 animation: .6s themes-fade-in 1; 1881 1876 } 1882 1877 1883 .control-panel-themes .filter-themes-count {1884 position: relative;1885 float: right;1886 line-height: 2.6;1887 }1888 1889 1878 .control-panel-themes .filter-themes-count .themes-displayed { 1890 1879 font-weight: 600; 1891 1880 color: #50575e; … … 2097 2086 box-sizing: border-box; 2098 2087 border-bottom: 1px solid #dcdcde; 2099 2088 } 2089 .customize-preview-header.themes-filter-bar, 2090 .customize-preview-header.themes-filter-bar .search-form { 2091 display: flex; 2092 align-items: center; 2093 gap: 10px; 2094 flex-wrap: wrap; 2095 } 2100 2096 2097 .customize-preview-header.themes-filter-bar .search-form-input { 2098 position: relative; 2099 } 2100 2101 .customize-preview-header .filter-themes-wrapper { 2102 display: grid; 2103 align-items: center; 2104 gap: 10px; 2105 grid-template-columns: auto 1fr; 2106 } 2107 2108 .customize-preview-header .filter-themes-wrapper .filter-themes-count { 2109 justify-self: end; 2110 } 2111 2101 2112 @media screen and (min-width: 1670px) { 2102 2113 .customize-preview-header.themes-filter-bar { 2103 2114 width: 82%; … … 2109 2120 .themes-filter-bar .themes-filter-container { 2110 2121 margin: 0; 2111 2122 padding: 0; 2123 display: flex; 2124 align-items: center; 2125 gap: 10px; 2112 2126 } 2113 2127 2114 2128 .themes-filter-bar .wp-filter-search { … … 2117 2131 max-width: 100%; 2118 2132 width: 40%; 2119 2133 min-width: 300px; 2120 position: absolute;2121 top: 6px;2122 left: 25px;2123 2134 height: 32px; 2124 2135 margin: 1px 0; 2136 top: 0; 2137 left: 0; 2125 2138 } 2126 2139 2140 .themes-filter-bar .wp-filter-search label { 2141 vertical-align: 2142 } 2143 2127 2144 /* Unstick the filter bar on short windows/screens. This breakpoint is based on the 2128 2145 current length of .org feature filters assuming translations do not wrap lines. */ 2129 2146 @media screen and (max-height: 540px), screen and (max-width: 1018px) { … … 2157 2174 2158 2175 @media screen and (max-width: 900px) { 2159 2176 .customize-preview-header.themes-filter-bar { 2160 height: 86px; 2161 padding-top: 46px; 2177 height: 96px; 2162 2178 } 2163 2179 2164 2180 .themes-filter-bar .wp-filter-search { 2165 width: calc(100% - 50px);2181 width: 100%; 2166 2182 margin: 0; 2167 2183 min-width: 200px; 2168 2184 } 2169 2185 2186 .customize-preview-header.themes-filter-bar, 2187 .customize-preview-header.themes-filter-bar .search-form 2188 .themes-filter-bar .themes-filter-container { 2189 display: grid; 2190 gap: 4px; 2191 } 2192 2193 .customize-preview-header.themes-filter-bar .search-form-input { 2194 display: flex; 2195 flex-grow: 1; 2196 } 2197 2198 .customize-preview-header.themes-filter-bar .search-icon { 2199 top: 6px; 2200 } 2201 2170 2202 .filter-drawer { 2171 2203 top: 86px; 2172 2204 } … … 2695 2727 2696 2728 .themes-filter-bar .search-icon { 2697 2729 position: absolute; 2698 top: 7px;2699 left: 2 6px;2730 top: 2px; 2731 left: 2px; 2700 2732 z-index: 1; 2701 2733 color: #646970; 2702 2734 height: 30px; … … 2814 2846 margin-top: 12px; 2815 2847 } 2816 2848 2817 .wp-core-ui .themes-filter-bar .feature-filter-toggle {2818 margin: 3px 0 3px 25px;2819 }2820 2849 } 2821 2850 2822 2851 @media screen and (max-width: 1200px) { … … 2964 2993 .reordering .reorder-done { 2965 2994 padding: 8px; 2966 2995 } 2967 2968 .wp-core-ui .themes-filter-bar .feature-filter-toggle {2969 margin: 0;2970 }2971 2996 } 2972 2997 2973 2998 @media screen and (max-width: 600px) { -
src/wp-includes/customize/class-wp-customize-themes-section.php
124 124 <button type="button" class="button button-primary customize-section-back customize-themes-mobile-back"><?php _e( 'Go to theme sources' ); ?></button> 125 125 <# if ( 'wporg' === data.action ) { #> 126 126 <div class="search-form"> 127 <label for="wp-filter-search-input-{{ data.id }}" class="screen-reader-text"> 128 <?php 129 /* translators: Hidden accessibility text. */ 130 _e( 'Search themes…' ); 131 ?> 132 </label> 133 <input type="search" id="wp-filter-search-input-{{ data.id }}" placeholder="<?php esc_attr_e( 'Search themes…' ); ?>" aria-describedby="{{ data.id }}-live-search-desc" class="wp-filter-search"> 134 <div class="search-icon" aria-hidden="true"></div> 135 <span id="{{ data.id }}-live-search-desc" class="screen-reader-text"> 136 <?php 137 /* translators: Hidden accessibility text. */ 138 _e( 'The search results will be updated as you type.' ); 139 ?> 140 </span> 127 <label for="wp-filter-search-input-{{ data.id }}"><?php _e( 'Search themes' ); ?></label> 128 <div class="search-form-input"> 129 <input type="search" id="wp-filter-search-input-{{ data.id }}" aria-describedby="{{ data.id }}-live-search-desc" class="wp-filter-search"> 130 <div class="search-icon" aria-hidden="true"></div> 131 <span id="{{ data.id }}-live-search-desc" class="screen-reader-text"> 132 <?php 133 /* translators: Hidden accessibility text. */ 134 _e( 'The search results will be updated as you type.' ); 135 ?> 136 </span> 137 </div> 141 138 </div> 139 <# } else { #> 140 <div class="themes-filter-container"> 141 <label for="{{ data.id }}-themes-filter"><?php _e( 'Search themes' ); ?></label> 142 <div class="search-form-input"> 143 <input type="search" id="{{ data.id }}-themes-filter" aria-describedby="{{ data.id }}-live-search-desc" class="wp-filter-search wp-filter-search-themes" /> 144 <div class="search-icon" aria-hidden="true"></div> 145 <span id="{{ data.id }}-live-search-desc" class="screen-reader-text"> 146 <?php 147 /* translators: Hidden accessibility text. */ 148 _e( 'The search results will be updated as you type.' ); 149 ?> 150 </span> 151 </div> 152 </div> 153 <# } #> 154 <div class="filter-themes-wrapper"> 155 <# if ( 'wporg' === data.action ) { #> 142 156 <button type="button" class="button feature-filter-toggle"> 143 157 <span class="filter-count-0"><?php _e( 'Filter themes' ); ?></span><span class="filter-count-filters"> 144 158 <?php … … 147 161 ?> 148 162 </span> 149 163 </button> 150 <# } else {#>151 <div class=" themes-filter-container">152 < label for="{{ data.id }}-themes-filter" class="screen-reader-text">164 <# } #> 165 <div class="filter-themes-count"> 166 <span class="themes-displayed"> 153 167 <?php 154 /* translators: Hidden accessibility text. */155 _e( 'Search themes…' );168 /* translators: %s: Number of themes displayed. */ 169 printf( __( '%s themes' ), '<span class="theme-count">0</span>' ); 156 170 ?> 157 </label>158 <input type="search" id="{{ data.id }}-themes-filter" placeholder="<?php esc_attr_e( 'Search themes…' ); ?>" aria-describedby="{{ data.id }}-live-search-desc" class="wp-filter-search wp-filter-search-themes" />159 <div class="search-icon" aria-hidden="true"></div>160 <span id="{{ data.id }}-live-search-desc" class="screen-reader-text">161 <?php162 /* translators: Hidden accessibility text. */163 _e( 'The search results will be updated as you type.' );164 ?>165 171 </span> 166 172 </div> 167 <# } #>168 <div class="filter-themes-count">169 <span class="themes-displayed">170 <?php171 /* translators: %s: Number of themes displayed. */172 printf( __( '%s themes' ), '<span class="theme-count">0</span>' );173 ?>174 </span>175 173 </div> 176 174 <?php 177 175 }