Skip to content

Commit

Permalink
Site editor: Update resize handle. (#47138)
Browse files Browse the repository at this point in the history
* Site editor: Update resize handle.

* Fix

* Update handle

* Fix linting.

* More linting

Co-authored-by: James Koster <james@jameskoster.co.uk>
  • Loading branch information
jasmussen and jameskoster authored Jan 16, 2023
1 parent ee432c0 commit 6f13377
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
21 changes: 14 additions & 7 deletions packages/edit-site/src/components/block-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,16 @@

&.is-variation-separator {
height: 100%;
width: $grid-unit-30;
right: 0;

&::after {
width: 1px;
width: 2px;
border-radius: 0;
background: $gray-800;
left: auto;
right: 50%;
background: transparent;
left: 50%;
transform: translateX(-1px);
right: 0;
transition: all ease 0.2s;
transition-delay: 0.1s;
@include reduce-motion;
Expand All @@ -112,10 +115,10 @@

&::after {
position: absolute;
top: 0;
top: $grid-unit-30;
left: $grid-unit-05;
right: 0;
bottom: 0;
bottom: $grid-unit-30;
content: "";
width: $grid-unit-05;
background: $gray-600;
Expand All @@ -137,12 +140,16 @@
background: $gray-400;
}
&.is-variation-separator::after {
width: 2px;
background: var(--wp-admin-theme-color);
}
}

&:focus::after {
box-shadow: 0 0 0 1px $gray-800, 0 0 0 calc(var(--wp-admin-border-width-focus) + 1px) var(--wp-admin-theme-color);
}

&.is-variation-separator:focus::after {
border-radius: $radius-block-ui;
box-shadow: inset 0 0 0 2px var(--wp-admin-theme-color);
}
}
5 changes: 1 addition & 4 deletions packages/edit-site/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,7 @@ export default function Layout( { onError } ) {
} }
handleComponent={ {
right: (
<ResizeHandle
direction="right"
variation="separator"
/>
<ResizeHandle variation="separator" />
),
} }
handleClasses={ undefined }
Expand Down
5 changes: 0 additions & 5 deletions packages/edit-site/src/components/layout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ $hub-height: $grid-unit-20 * 2 + $button-size;
.edit-site-layout__content {
flex-grow: 1;
display: flex;
gap: $canvas-padding;

// Hide scrollbars during the edit/view animation.
overflow: hidden;
Expand All @@ -85,10 +84,6 @@ $hub-height: $grid-unit-20 * 2 + $button-size;
top: 0;
}

.resizable-editor__drag-handle.is-right {
right: math.div(-$grid-unit-15, 2);
}

> div {
overflow-y: auto;
min-height: 100%;
Expand Down

1 comment on commit 6f13377

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 6f13377.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3929154986
📝 Reported issues:

Please sign in to comment.