From 3e75aa82f6eac9e0f410a12e934cfe28adbab3a1 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Wed, 26 Jun 2019 12:12:30 +0200 Subject: [PATCH] SONAR-11714 Make badges round --- .../src/main/js/app/styles/components/badges.css | 12 ++---------- .../src/main/js/components/facet/FacetHeader.tsx | 2 +- .../__snapshots__/FacetHeader-test.tsx.snap | 6 +++--- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/server/sonar-web/src/main/js/app/styles/components/badges.css b/server/sonar-web/src/main/js/app/styles/components/badges.css index 5704c6ed703..89b735f3b71 100644 --- a/server/sonar-web/src/main/js/app/styles/components/badges.css +++ b/server/sonar-web/src/main/js/app/styles/components/badges.css @@ -23,7 +23,7 @@ height: var(--smallControlHeight); line-height: calc(var(--smallControlHeight) - 1px); padding: 0 var(--gridSize); - border-radius: 2px; + border-radius: 10px; font-size: var(--smallFontSize); min-width: 10px; letter-spacing: 0.03em; @@ -47,12 +47,6 @@ a.badge { border-bottom: none; } -.badge.is-rounded { - padding-left: 5px; - padding-right: 5px; - border-radius: 50px; -} - .badge-medium { height: var(--controlHeight); line-height: calc(var(--controlHeight)); @@ -111,7 +105,6 @@ a.badge { .badge-danger-light { border: 1px solid var(--alertBorderError) !important; - border-radius: 3px; background-color: var(--alertBackgroundError); color: #a94442; } @@ -124,7 +117,6 @@ a.badge-danger-light:active { .badge-focus { border: 1px solid #faebcc; - border-radius: 3px; background-color: #fcf8e3; color: #8a6d3b; font-weight: 400; @@ -147,7 +139,7 @@ a.badge-focus:active { line-height: calc(var(--smallControlHeight) - 1px); padding: 0 var(--gridSize); border: 1px solid var(--gray80); - border-radius: 2px; + border-radius: 10px; box-sizing: border-box; background-color: var(--gray80); font-size: var(--smallFontSize); diff --git a/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx b/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx index 600ee76ca42..9fc909e9a9f 100644 --- a/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx +++ b/server/sonar-web/src/main/js/components/facet/FacetHeader.tsx @@ -60,7 +60,7 @@ export default class FacetHeader extends React.PureComponent { const value = values.length === 1 ? values[0] : translateWithParameters('x_selected', values.length); return ( - + {value} ); diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/FacetHeader-test.tsx.snap b/server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/FacetHeader-test.tsx.snap index 2e5979cbff6..d0b3085bc68 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/FacetHeader-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/FacetHeader-test.tsx.snap @@ -22,7 +22,7 @@ exports[`should clear 1`] = ` className="search-navigator-facet-header-value spacer-left spacer-right " > x_selected.3 @@ -59,7 +59,7 @@ exports[`should render closed facet with value 1`] = ` className="search-navigator-facet-header-value spacer-left spacer-right " > foo @@ -114,7 +114,7 @@ exports[`should render open facet with value 1`] = ` className="search-navigator-facet-header-value spacer-left spacer-right " > foo -- 2.39.5