Skip to content

Commit

Permalink
Revert input sizes
Browse files Browse the repository at this point in the history
Ensure long file names are not cut off by min-width
Use clamp value for focal picker image height
  • Loading branch information
ramonjd committed Jul 3, 2024
1 parent d0a56df commit 34d20ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -545,13 +545,15 @@ function BackgroundSizeControls( {
return (
<VStack spacing={ 3 } className="single-column">
<FocalPointPicker
__next40pxDefaultSize
__nextHasNoMarginBottom
label={ __( 'Position' ) }
url={ getResolvedThemeFilePath( imageValue, themeFileURIs ) }
value={ backgroundPositionToCoords( positionValue ) }
onChange={ updateBackgroundPosition }
/>
<ToggleGroupControl
size="__unstable-large"
label={ __( 'Size' ) }
value={ currentValueForToggle }
onChange={ updateBackgroundSize }
Expand Down Expand Up @@ -590,6 +592,7 @@ function BackgroundSizeControls( {
aria-label={ __( 'Background image width' ) }
onChange={ updateBackgroundSize }
value={ sizeValue }
size="__unstable-large"
__unstableInputWidth="100px"
min={ 0 }
placeholder={ __( 'Auto' ) }
Expand Down
11 changes: 7 additions & 4 deletions packages/block-editor/src/components/global-styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,12 @@
text-align-last: center;
}

.block-editor-global-styles-background-panel__inspector-image-indicator-wrapper {
width: 20px;
height: 20px;
.block-editor-global-styles-background-panel__inspector-preview-inner {
.block-editor-global-styles-background-panel__inspector-image-indicator-wrapper {
width: 20px;
height: 20px;
min-width: auto;
}
}

.block-editor-global-styles-background-panel__inspector-image-indicator {
Expand Down Expand Up @@ -190,7 +193,7 @@
margin-bottom: 0;
}
.components-focal-point-picker__media--image {
max-height: 100px;
max-height: clamp(120px, 9vh, 280px);
}
}

Expand Down

0 comments on commit 34d20ce

Please sign in to comment.