Make WordPress Core


Ignore:
Timestamp:
03/01/2021 11:24:13 PM (4 years ago)
Author:
ryelle
Message:

Twenty Twenty-One: Correct inner container background color for Cover Blocks.

Adjust the background color palette rules so they don't show up on inner containers when they're not supposed to:

  • When an inner container block is present, it only applies them to direct children of the block with the background color assigned.
  • Since the background color should only be applied to the Cover block's overlay, not to the inner container, it opts that specific block out of this rule.

Props dianeco, kjellr, paaljoachim.
Fixes #52676.

File:
1 edited

Legend:

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

    r49726 r50466  
    109109        border: calc(3 * var(--separator--height)) solid var(--global--color-border);
    110110    }
     111
     112    /* The background color class is used just for the overlay, and does not need to be applied to the inner container. */
     113    &[class*="-background-color"][class] .wp-block-cover__inner-container {
     114        background-color: unset;
     115    }
    111116}
Note: See TracChangeset for help on using the changeset viewer.