Make WordPress Core


Ignore:
Timestamp:
02/14/2022 09:53:47 PM (2 years ago)
Author:
audrasjb
Message:

Twenty Twenty-One: Allow editor styles to control block margins.

This change removes some overrides that prevented site editor updates in 5.9 from controlling vertical margins via var(--global--spacing-vertical).

Props stacimc, Boniu91, aristath, ironprogrammer, nidhidhandhukiya.
Fixes #54250.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/assets/sass/05-blocks/button/_editor.scss

    r50972 r52726  
    77 * Block Options
    88 */
    9 
    10 // The parent container does not need outer margins applied.
    11 // The children should all have top and bottom margins.
    12 [data-block].wp-block-buttons {
    13     margin-top: 0;
    14     margin-bottom: 0;
    15 
    16     .wp-block-button:first-child {
    17         margin-top: var(--global--spacing-vertical);
    18     }
    19 
    20     .wp-block-button:last-child {
    21         margin-bottom: var(--global--spacing-vertical);
    22     }
    23 }
    249
    2510.wp-block-button {
Note: See TracChangeset for help on using the changeset viewer.