Skip to content

Commit

Permalink
Position and label tweaks for group block background size control (#5…
Browse files Browse the repository at this point in the history
…8854)

Co-authored-by: richtabor <richtabor@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
  • Loading branch information
3 people committed Feb 8, 2024
1 parent c7773de commit 0d46659
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/block-editor/src/hooks/background.js
Expand Up @@ -365,12 +365,12 @@ function BackgroundImagePanelItem( {

function backgroundSizeHelpText( value ) {
if ( value === 'cover' || value === undefined ) {
return __( 'Stretch image to cover the block.' );
return __( 'Image covers the space evenly.' );
}
if ( value === 'contain' ) {
return __( 'Resize image to fit without cropping.' );
return __( 'Image is contained without distortion.' );
}
return __( 'Set a fixed width.' );
return __( 'Specify a fixed width.' );
}

export const coordsToBackgroundPosition = ( value ) => {
Expand Down Expand Up @@ -510,7 +510,6 @@ function BackgroundSizePanelItem( {
panelId={ clientId }
>
<FocalPointPicker
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Position' ) }
url={ style?.background?.backgroundImage?.url }
Expand All @@ -520,7 +519,6 @@ function BackgroundSizePanelItem( {
onChange={ updateBackgroundPosition }
/>
<ToggleGroupControl
__nextHasNoMarginBottom
size={ '__unstable-large' }
label={ __( 'Size' ) }
value={ currentValueForToggle }
Expand Down Expand Up @@ -555,8 +553,7 @@ function BackgroundSizePanelItem( {
) : null }
{ currentValueForToggle !== 'cover' && (
<ToggleControl
__nextHasNoMarginBottom
label={ __( 'Repeat image' ) }
label={ __( 'Repeat' ) }
checked={ repeatCheckedValue }
onChange={ toggleIsRepeated }
/>
Expand Down

0 comments on commit 0d46659

Please sign in to comment.