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

Improve color contrast of the default block inserter shortcuts. #12928

Merged
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions packages/editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,12 @@
&.is-typing .editor-block-list__empty-block-inserter,
&.is-typing .editor-block-list__side-inserter {
opacity: 0;
animation: none;
}

.editor-block-list__empty-block-inserter,
.editor-block-list__side-inserter {
opacity: 1;
transition: opacity 0.2s;
@include edit-post__fade-in-animation;
}

// Reusable blocks
Expand Down
20 changes: 4 additions & 16 deletions packages/editor/src/components/default-block-appender/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,17 @@
}
}

// Show quick insertion icons faded until hover.
.editor-inserter-with-shortcuts {
opacity: 0.5;
transition: opacity 0.2s;

.components-icon-button:not(:hover) {
// Use opacity to work in various editor styles.
color: $dark-opacity-500;
.is-dark-theme & {
color: $light-opacity-500;
}
}
}

// Don't show the inserter until mousing over.
.editor-inserter__toggle:not([aria-expanded="true"]) {
opacity: 0;
transition: opacity 0.2s;
}

&:hover {
.editor-inserter-with-shortcuts {
opacity: 1;
@include edit-post__fade-in-animation;
}

.editor-inserter__toggle {
opacity: 1;
}
Expand Down Expand Up @@ -103,7 +92,6 @@
}

.editor-inserter__toggle {
transition: opacity 0.2s;
border-radius: 50%;
width: $block-side-ui-width;
height: $block-side-ui-width;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
padding-top: 8px;

// Use opacity to work in various editor styles.
color: $dark-opacity-light-700;
color: $dark-opacity-500;
.is-dark-theme & {
color: $light-opacity-light-700;
color: $light-opacity-500;
}
}