From 97d30aa9b23857c511d217110bfe86ca38b3cc67 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Fri, 30 Sep 2022 13:30:24 +0200 Subject: [PATCH] [NO JIRA] Use flexbox for styling ratings --- .../main/js/apps/component-measures/style.css | 1 - .../src/main/js/components/ui/Rating.css | 23 +++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/component-measures/style.css b/server/sonar-web/src/main/js/apps/component-measures/style.css index 2e7b5b50693..91aa60374a3 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/style.css +++ b/server/sonar-web/src/main/js/apps/component-measures/style.css @@ -107,7 +107,6 @@ button.search-navigator-facet { .measure-details-value .rating { width: 18px; height: 18px; - line-height: 18px; margin-top: -2px; margin-bottom: -2px; font-size: var(--smallFontSize); diff --git a/server/sonar-web/src/main/js/components/ui/Rating.css b/server/sonar-web/src/main/js/components/ui/Rating.css index da2ce4dc66e..ca0471320e2 100644 --- a/server/sonar-web/src/main/js/components/ui/Rating.css +++ b/server/sonar-web/src/main/js/components/ui/Rating.css @@ -18,16 +18,24 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ .rating { - display: inline-block; + display: inline-flex; width: var(--controlHeight); height: var(--controlHeight); - line-height: calc(var(--controlHeight) - 1px); border-radius: var(--controlHeight); border: 1px solid var(--blacka38); box-sizing: border-box; font-size: var(--bigFontSize); font-weight: 400; - text-align: center; + align-items: center; + justify-content: center; +} + +.rating-small { + width: 20px; + height: 20px; + margin-top: -1px; + margin-bottom: -1px; + font-size: var(--mediumFontSize); } .rating-muted { @@ -64,12 +72,3 @@ a > .rating-E, color: var(--white); background-color: var(--error500); } - -.rating-small { - width: 20px; - height: 20px; - line-height: 19px; - margin-top: -1px; - margin-bottom: -1px; - font-size: var(--mediumFontSize); -} -- 2.39.5