Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inserter: add a more pronounced hover effect. #44711

Merged
merged 2 commits into from
Oct 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,26 @@

&:not(:disabled) {
&:hover {
color: var(--wp-admin-theme-color) !important;
.block-editor-block-types-list__item-title {
color: var(--wp-admin-theme-color) !important;
filter: brightness(0.95);
}

svg {
color: var(--wp-admin-theme-color) !important;
}

&::after {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
border-radius: $radius-block-ui;
opacity: 0.04;
background: var(--wp-admin-theme-color);
Copy link
Member

@kevin940726 kevin940726 Oct 11, 2022

Choose a reason for hiding this comment

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

I think this pseudo element breaks dragging-and-dropping from the inserter in Firefox. (Took me a while to find this! For some reason git blame failed me 😞.)

A simple solution to this would be adding pointer-events: none to the ::after pseudo element.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's interesting!

Copy link
Member

@kevin940726 kevin940726 Oct 11, 2022

Choose a reason for hiding this comment

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

I included a fix in #44631 (and added e2e tests for Firefox).

}
}

&:focus {
Expand Down