Making WordPress.org

Changeset 13855


Ignore:
Timestamp:
06/24/2024 10:45:06 PM (4 months ago)
Author:
ryelle
Message:

Plugin Directory: Move spacing to parent element for search bar.

This is an alternate solution to https://github.com/WordPress/wordpress.org/issues/327. Rather than creating a duplicate container for the search bar, the left/right spacing can be added to the alignfull element directly. This adds back the expected left/right spacing now that nested alignfull elements have negative margins.

See https://github.com/WordPress/wordpress.org/pull/328.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/patterns/full-width-search.php

    r13792 r13855  
    44 * Slug: wporg-plugins-2024/full-width-search
    55 * Inserter: no
    6  *
    76 */
    87
    98?>
    109
    11 <!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20"}}}} -->
    12     <div class="wp-block-group alignfull" style="margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)">
    13     <!-- wp:group {"tagName":"div","style":{"spacing":{"padding":{"left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space"}}}} -->
    14         <div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--edge-space);padding-left:var(--wp--preset--spacing--edge-space)">
    15             <!-- wp:search {"label":"<?php esc_attr_e( 'Search plugins', 'wporg' ); ?>","showLabel":false,"placeholder":"<?php esc_attr_e( 'Search plugins', 'wporg' ); ?>","width":232,"widthUnit":"px","buttonText":"<?php esc_attr_e( 'Search plugins', 'wporg' ); ?>","buttonPosition":"button-inside","buttonUseIcon":true} /-->
    16         </div>
    17     <!-- /wp:group -->
    18     </div>
     10<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20"},"padding":{"right":"var:preset|spacing|edge-space","left":"var:preset|spacing|edge-space"}}}} -->
     11<div class="wp-block-group alignfull" style="margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--edge-space);padding-left:var(--wp--preset--spacing--edge-space)">
     12    <!-- wp:search {"label":"<?php esc_attr_e( 'Search plugins', 'wporg' ); ?>","showLabel":false,"placeholder":"<?php esc_attr_e( 'Search plugins', 'wporg' ); ?>","width":232,"widthUnit":"px","buttonText":"<?php esc_attr_e( 'Search plugins', 'wporg' ); ?>","buttonPosition":"button-inside","buttonUseIcon":true} /-->
     13</div>
    1914<!-- /wp:group -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/templates/single-plugin.html

    r13792 r13855  
    11<!-- wp:template-part {"slug":"header","tagName":"div","className":"has-display-contents"} /-->
    22
    3 <!-- wp:pattern {"slug":"wporg-plugins-2024/full-width-search"} /-->
    43<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space","bottom":"var:preset|spacing|60"}}},"layout":{"type":"constrained"}} -->
    54<main class="wp-block-group" style="padding-right:var(--wp--preset--spacing--edge-space);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--edge-space)">
     5    <!-- wp:pattern {"slug":"wporg-plugins-2024/full-width-search"} /-->
    66    <!-- wp:wporg/single-plugin /-->
    77</main>
Note: See TracChangeset for help on using the changeset viewer.