Skip to content

Commit

Permalink
In the site editor, show the background size panel if a value is pres…
Browse files Browse the repository at this point in the history
…ent, just like block styles.
  • Loading branch information
ramonjd committed May 6, 2024
1 parent 57c5b9a commit 7841476
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,9 @@ function BackgroundSizeToolsPanelItem( {
( currentValueForToggle === 'cover' && repeatValue === undefined )
);

const hasValue = hasBackgroundSizeValue( style );
const hasValue =
hasBackgroundSizeValue( inheritedValue ) ||
hasBackgroundSizeValue( style );

const resetAllFilter = useCallback( ( previousValue ) => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export default function BackgroundPanel() {

const defaultControls = {
backgroundImage: true,
backgroundSize:
!! style?.background?.backgroundImage &&
!! inheritedStyle?.background?.backgroundImage,
backgroundSize: false,
};

return (
Expand Down

0 comments on commit 7841476

Please sign in to comment.