Skip to content

Commit

Permalink
Remove inconsistent dark theme focus style on block selection (#64549)
Browse files Browse the repository at this point in the history
* remove $dark-theme-focus

* remove is-dark-theme outline color shift on block selection

* remove custom dark theme focus for nav link

* remove template part dark theme focus

Co-authored-by: richtabor <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
  • Loading branch information
3 people authored Aug 15, 2024
1 parent 289589c commit 38d0500
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion packages/base-styles/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ $gray-100: #f0f0f0; // Used for light gray backgrounds.
$white: #fff;

// Opacities & additional colors.
$dark-theme-focus: $white; // Focus color when the theme is dark.
$dark-gray-placeholder: rgba($gray-900, 0.62);
$medium-gray-placeholder: rgba($gray-900, 0.55);
$light-gray-placeholder: rgba($white, 0.65);
Expand Down
10 changes: 0 additions & 10 deletions packages/block-editor/src/components/block-list/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
&::after {
@include selected-block-focus();
z-index: 1;

// Show a light color for dark themes.
.is-dark-theme & {
outline-color: $dark-theme-focus;
}
}
}

Expand Down Expand Up @@ -285,11 +280,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
&.block-editor-block-list__block:not([contenteditable]):focus {
&::after {
outline-color: var(--wp-block-synced-color);

// Show a light color for dark themes.
.is-dark-theme & {
outline-color: $dark-theme-focus;
}
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions packages/block-library/src/navigation-link/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@
$stop2: 64%;

--wp-underline-color: var(--wp-admin-theme-color);
.is-dark-theme & {
--wp-underline-color: #{ $dark-theme-focus };
}

background-image:
linear-gradient(45deg, transparent ($stop1 - $blur), var(--wp-underline-color) $stop1, var(--wp-underline-color) ($stop1 + $width), transparent ($stop1 + $width + $blur)),
Expand Down
5 changes: 0 additions & 5 deletions packages/block-library/src/template-part/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
&.block-editor-block-list__block:not([contenteditable]):focus {
&::after {
outline-color: var(--wp-block-synced-color);

// Show a light color for dark themes.
.is-dark-theme & {
outline-color: $dark-theme-focus;
}
}
}
}
Expand Down

1 comment on commit 38d0500

@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 38d0500.
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/10408155581
📝 Reported issues:

Please sign in to comment.