From 2eda9872b151a17dc88b9f114a41e3f9007b44c1 Mon Sep 17 00:00:00 2001 From: 7PH Date: Fri, 30 Jun 2023 13:45:14 +0200 Subject: [PATCH] SONAR-19711 Drop security report styles.css file --- .../__snapshots__/CodeSnippet-test.tsx.snap | 16 ++++++++++++++-- .../design-system/src/components/buttons.tsx | 14 +++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap b/server/sonar-web/design-system/src/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap index 84ed10557aa..5c3aaab54b0 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap +++ b/server/sonar-web/design-system/src/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap @@ -21,7 +21,7 @@ exports[`should show full size when multiline with no editting 1`] = ` -webkit-text-decoration: none; text-decoration: none; outline: none; - border: var(--border)!important; + border: var(--border); color: var(--color); background-color: var(--background); -webkit-transition: background-color 0.2s ease,outline 0.2s ease; @@ -90,6 +90,12 @@ exports[`should show full size when multiline with no editting 1`] = ` pointer-events: none; } +.emotion-4:hover, +.emotion-4:active, +.emotion-4:focus { + border-color: rgb(197,205,223); +} + .code-snippet-highlighted-oneline .emotion-4 { bottom: 0.5rem; } @@ -221,7 +227,7 @@ exports[`should show reduced size when single line with no editting 1`] = ` -webkit-text-decoration: none; text-decoration: none; outline: none; - border: var(--border)!important; + border: var(--border); color: var(--color); background-color: var(--background); -webkit-transition: background-color 0.2s ease,outline 0.2s ease; @@ -292,6 +298,12 @@ exports[`should show reduced size when single line with no editting 1`] = ` pointer-events: none; } +.emotion-4:hover, +.emotion-4:active, +.emotion-4:focus { + border-color: rgb(197,205,223); +} + .code-snippet-highlighted-oneline .emotion-4 { bottom: 0.5rem; } diff --git a/server/sonar-web/design-system/src/components/buttons.tsx b/server/sonar-web/design-system/src/components/buttons.tsx index d5dc804a097..e71a3cee200 100644 --- a/server/sonar-web/design-system/src/components/buttons.tsx +++ b/server/sonar-web/design-system/src/components/buttons.tsx @@ -110,7 +110,7 @@ const buttonStyle = (props: ThemedProps) => css` box-sizing: border-box; text-decoration: none; outline: none; - border: var(--border) !important; + border: var(--border); color: var(--color); background-color: var(--background); transition: background-color 0.2s ease, outline 0.2s ease; @@ -186,6 +186,12 @@ export const ButtonSecondary: React.FC = styled(Button)` --color: ${themeContrast('buttonSecondary')}; --focus: ${themeColor('buttonSecondaryBorder', OPACITY_20_PERCENT)}; --border: ${themeBorder('default', 'buttonSecondaryBorder')}; + + &:hover, + &:active, + &:focus { + border-color: ${themeColor('buttonSecondaryBorder')}; + } `; export const DangerButtonPrimary: React.FC = styled(Button)` @@ -202,6 +208,12 @@ export const DangerButtonSecondary: React.FC = styled(Button)` --color: ${themeContrast('dangerButtonSecondary')}; --focus: ${themeColor('dangerButtonSecondaryFocus', OPACITY_20_PERCENT)}; --border: ${themeBorder('default', 'dangerButtonSecondaryBorder')}; + + &:hover, + &:active, + &:focus { + border-color: ${themeColor('dangerButtonSecondaryBorder')}; + } `; export const WrapperButton: React.FC = styled(Button)` -- 2.39.5