From e86cfb7326c8398087a5cf3b2ceb48f7d446f765 Mon Sep 17 00:00:00 2001 From: Aleksey Novikov Date: Wed, 15 Jan 2025 09:35:10 +0300 Subject: [PATCH] #9317 Rewrite Actions long CSS rules Fixes #9317 --- .../src/common-styles/sv-actionbar.scss | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/packages/survey-core/src/common-styles/sv-actionbar.scss b/packages/survey-core/src/common-styles/sv-actionbar.scss index 1f5ca232e3..8f8cdcfed5 100644 --- a/packages/survey-core/src/common-styles/sv-actionbar.scss +++ b/packages/survey-core/src/common-styles/sv-actionbar.scss @@ -89,31 +89,30 @@ button.sv-action-bar-item { } } -//hovered state -.sv-action-bar-item:not(.sv-action-bar-item--pressed):hover:enabled, -.sv-action-bar-item:not(.sv-action-bar-item--pressed):focus:enabled { - outline: none; - background-color: $background-dim; -} +.sv-action-bar-item { + //hovered and focused state + &:hover, + &:focus { + outline: none; + background-color: $background-dim; + } -.sv-action-bar-item--active.sv-action-bar-item--pressed { + //pressed state + &:active, + &.svc-toolbar__item--pressed { + opacity: 0.5; + } - &:focus, - &:focus-visible { + //checked state + &.svc-toolbar__item--active { outline: none; - // background-color: $background-dim; } -} -//pressed state -.sv-action-bar-item:not(.sv-action-bar-item--pressed):active:enabled { - opacity: 0.5; -} - -//disabled state -.sv-action-bar-item:disabled { - opacity: 0.25; - cursor: default; + //disabled state + &:disabled { + opacity: 0.25; + cursor: default; + } } .sv-action-bar-item__title {