Make WordPress Core


Ignore:
Timestamp:
02/14/2022 10:18:52 PM (4 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.
Merges [52726] to the 5.9 branch.
Fixes #54250.

Location:
branches/5.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9

  • branches/5.9/src/wp-content/themes/twentytwentyone/assets/sass/05-blocks/button/_editor.scss

    r50972 r52727  
    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.