]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12416 Fine-tune badges appearance
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Mon, 26 Aug 2019 07:31:41 +0000 (09:31 +0200)
committerSonarTech <sonartech@sonarsource.com>
Tue, 27 Aug 2019 18:21:05 +0000 (20:21 +0200)
server/sonar-web/src/main/js/app/styles/components/badges.css
server/sonar-web/src/main/js/components/common/PrivacyBadgeContainer.tsx
server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/PrivacyBadgeContainer-test.tsx.snap

index 02a9d1cd71c7e0d38f1a93b6227402ed6a317c54..af40a09aeb5fc901385e8a57d1f7d3615af54456 100644 (file)
  */
 .badge {
   display: inline-block;
-  padding: 2px 4px;
+  padding: 4px;
   background-color: var(--barBorderColor);
   border-radius: 3px;
   font-size: var(--smallFontSize);
-  font-weight: normal;
+  font-weight: 600;
   color: var(--baseFontColor);
   text-transform: uppercase;
   white-space: nowrap;
-  line-height: 1;
+  line-height: 8px;
 }
 .badge:empty {
   display: none;
@@ -71,11 +71,3 @@ a.badge {
   background-color: var(--alertBackgroundError);
   color: var(--alertTextError);
 }
-
-/* TODO: remove after SC fork */
-.badge-icon {
-  padding-left: calc(var(--gridSize) / 2);
-}
-.badge-icon svg {
-  height: calc(var(--smallControlHeight) - 2px);
-}
index 00fa3a13c89798462b706f62c01f22f48e34c87f..670f7044634c3d1f7ece863c379f6ec0ae87a46d 100644 (file)
@@ -77,8 +77,7 @@ export function PrivacyBadge({
   const badge = (
     <div
       className={classNames('badge', className, {
-        'badge-info': Boolean(icon),
-        'badge-icon': Boolean(icon)
+        'badge-info': Boolean(icon)
       })}>
       {icon}
       {translate('visibility', visibility)}
index f6aec9bf389ae1da93a17ce09abe8fc467e5a2bf..68240d974eee00bc171913f372269d9416779c1a 100644 (file)
@@ -41,7 +41,7 @@ exports[`renders public with icon 1`] = `
   }
 >
   <div
-    className="badge badge-info badge-icon"
+    className="badge badge-info"
   >
     <VisibleIcon
       className="little-spacer-right"