Skip to content

Commit

Permalink
added classes to avoid using component selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieCabrera committed Jul 4, 2024
1 parent 056beb2 commit e1f50a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export default function Shuffle( { clientId, as = Container } ) {
<ComponentToUse
label={ __( 'Shuffle' ) }
icon={ shuffle }
className="block-editor-block-toolbar-shuffle"
onClick={ () => {
const nextPattern = getNextPattern();
nextPattern.blocks[ 0 ].attributes = {
Expand Down
8 changes: 5 additions & 3 deletions packages/block-editor/src/components/block-tools/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,14 @@

.zoom-out-toolbar {

.components-button:focus::before {
.block-editor-block-mover-button.block-editor-block-mover-button:focus-visible::before,
.zoom-out-toolbar-button:focus::before,
.block-editor-block-toolbar-shuffle:focus::before,
.block-selection-button_drag-handle:focus::before {
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
}

.components-toolbar,
.components-toolbar-group {
.block-editor-block-mover {
background: none;
border: none;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default function ZoomOutToolbar( { clientId, rootClientId } ) {
{ ( draggableProps ) => (
<Button
icon={ dragHandle }
className="block-selection-button_drag-handle"
className="block-selection-button_drag-handle zoom-out-toolbar-button"
aria-hidden="true"
label={ __( 'Drag' ) }
iconSize={ 24 }
Expand Down Expand Up @@ -127,6 +127,7 @@ export default function ZoomOutToolbar( { clientId, rootClientId } ) {
) }
{ canRemove && ! isBlockTemplatePart && (
<ToolbarButton
className="zoom-out-toolbar-button"
icon={ trash }
label="Delete"
onClick={ () => {
Expand Down

0 comments on commit e1f50a0

Please sign in to comment.