Skip to content

Commit

Permalink
Border panel: Update panel layout (#35938)
Browse files Browse the repository at this point in the history
* Restore single-column styling for appropriate controls

* Remove clear button from Color picker in ToolsPanel
  • Loading branch information
stacimc committed Nov 22, 2021
1 parent 414b960 commit a375152
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/block-editor/src/hooks/border-color.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export function BorderColorEdit( props ) {
disableCustomColors={ disableCustomColors }
disableCustomGradients={ disableCustomGradients }
onColorChange={ onChangeColor }
clearable={ false }
/>
);
}
Expand Down
5 changes: 5 additions & 0 deletions packages/block-editor/src/hooks/border.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.border-block-support-panel {
.single-column {
grid-column: span 1;
}
}
1 change: 1 addition & 0 deletions packages/block-editor/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
@import "./components/warning/style.scss";
@import "./hooks/anchor.scss";
@import "./hooks/layout.scss";
@import "./hooks/border.scss";
@import "./hooks/typography.scss";

@import "./components/block-toolbar/style.scss";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export default function BorderPanel( { name } ) {
disableCustomColors={ disableCustomColors }
disableCustomGradients={ disableCustomGradients }
onColorChange={ handleOnChange( setBorderColor ) }
clearable={ false }
/>
</ToolsPanelItem>
) }
Expand Down
4 changes: 4 additions & 0 deletions packages/edit-site/src/components/sidebar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
border: 0;
}

.edit-site-global-styles-sidebar .components-tools-panel-item.single-column {
grid-column: span 1;
}

.edit-site-global-styles-sidebar__blocks-group {
padding-top: $grid-unit-30;
border-top: $border-width solid $gray-200;
Expand Down

0 comments on commit a375152

Please sign in to comment.