From: Philippe Perrin Date: Thu, 6 Aug 2020 16:45:18 +0000 (+0200) Subject: SONAR-13617 Copy button should be centered in code snippet component X-Git-Tag: 8.5.0.37579~166 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c23296a956a8f44bc03d3865fb43d723c01a3833;p=sonarqube.git SONAR-13617 Copy button should be centered in code snippet component --- diff --git a/server/sonar-web/src/main/js/components/common/CodeSnippet.css b/server/sonar-web/src/main/js/components/common/CodeSnippet.css index 9902360188c..aa439e2d93a 100644 --- a/server/sonar-web/src/main/js/components/common/CodeSnippet.css +++ b/server/sonar-web/src/main/js/components/common/CodeSnippet.css @@ -30,7 +30,7 @@ } .code-snippet > button { - height: 36px; + height: auto; border: 0; border-radius: 0; background: transparent; @@ -43,7 +43,3 @@ background-color: var(--transparentGray); color: var(--darkBlue); } - -.code-snippet-oneline > button { - height: auto; -} diff --git a/server/sonar-web/src/main/js/components/common/CodeSnippet.tsx b/server/sonar-web/src/main/js/components/common/CodeSnippet.tsx index f8dd4eb8d94..24a3bfa610d 100644 --- a/server/sonar-web/src/main/js/components/common/CodeSnippet.tsx +++ b/server/sonar-web/src/main/js/components/common/CodeSnippet.tsx @@ -41,10 +41,7 @@ export default function CodeSnippet(props: CodeSnippetProps) { } return ( -
+
         {finalSnippet}
       
diff --git a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/CodeSnippet-test.tsx.snap b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/CodeSnippet-test.tsx.snap index 2d1100b23f5..f1901c905d0 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/CodeSnippet-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/CodeSnippet-test.tsx.snap @@ -49,7 +49,7 @@ bar exports[`renders correctly: single line with array snippet 1`] = `