From 6debfcf7695ea746be5727730ea76877f9a66002 Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Fri, 26 Jan 2024 09:27:24 +1100 Subject: [PATCH] Global styles revisions: fix is-selected rules from affecting other areas of the editor (#58228) --- .../global-styles/screen-revisions/style.scss | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/screen-revisions/style.scss b/packages/edit-site/src/components/global-styles/screen-revisions/style.scss index 4228f199689cbd..06e47c8f1e5fda 100644 --- a/packages/edit-site/src/components/global-styles/screen-revisions/style.scss +++ b/packages/edit-site/src/components/global-styles/screen-revisions/style.scss @@ -41,6 +41,7 @@ // This border serves as a background color in Windows High Contrast mode. border: 4px solid transparent; } + &.is-selected { border-radius: $radius-block-ui; @@ -48,6 +49,17 @@ outline: 3px solid transparent; outline-offset: -2px; + color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba)); + background: rgba(var(--wp-admin-theme-color--rgb), 0.04); + + .edit-site-global-styles-screen-revisions__revision-button { + opacity: 1; + } + + .edit-site-global-styles-screen-revisions__date { + color: var(--wp-admin-theme-color); + } + &::before { background: var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba)); } @@ -81,17 +93,6 @@ } } -.is-selected { - color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba)); - background: rgba(var(--wp-admin-theme-color--rgb), 0.04); - .edit-site-global-styles-screen-revisions__revision-button { - opacity: 1; - } - .edit-site-global-styles-screen-revisions__date { - color: var(--wp-admin-theme-color); - } -} - .edit-site-global-styles-screen-revisions__apply-button.is-primary, .edit-site-global-styles-screen-revisions__applied-text { align-self: flex-start;