Skip to content

Commit

Permalink
Image block: don't show pointer cursor on linked image in the editor (#…
Browse files Browse the repository at this point in the history
…55882)

* When the Image block is linked it's wrapped with a disabled <a /> tag. This created a small regression in the editor: the cursor shows the "pointer" style.
In this PR we restore cursor style, so it doesn't appear 'clickable'.

* Move the cursor rule to nest underneath `.wp-block-image {` for less specificity
  • Loading branch information
ramonjd authored Nov 6, 2023
1 parent b4857fd commit 7d93901
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/block-library/src/image/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ figure.wp-block-image:not(.wp-block) {
left: 50%;
transform: translate(-50%, -50%);
}

// When the Image block is linked,
// it's wrapped with a disabled <a /> tag.
// Restore cursor style so it doesn't appear 'clickable'.
> a {
cursor: default;
}
}

// This is necessary for the editor resize handles to accurately work on a non-floated, non-resized, small image.
Expand Down

0 comments on commit 7d93901

Please sign in to comment.