From a43427ce29c1f00f21635adc87bd789e958653cb Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Fri, 24 Jan 2025 16:33:40 +0100
Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Minor=20code=20style=20improveme?=
=?UTF-8?q?nt=20in=20SCSS?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../reusable-components/_badge-box.scss | 6 ++---
.../reusable-components/_title-badge.scss | 26 +++++++++++--------
2 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/modules/ppcp-settings/resources/css/components/reusable-components/_badge-box.scss b/modules/ppcp-settings/resources/css/components/reusable-components/_badge-box.scss
index 74fb531ee..83c18362c 100644
--- a/modules/ppcp-settings/resources/css/components/reusable-components/_badge-box.scss
+++ b/modules/ppcp-settings/resources/css/components/reusable-components/_badge-box.scss
@@ -30,7 +30,7 @@
&--has-image-badge .ppcp-r-title-badge--info {
display: block;
- margin: 6px 0px 0px 0px;
+ margin: 6px 0 0 0;
width: fit-content;
}
@@ -42,9 +42,9 @@
flex-direction: column;
.ppcp-r-badge-box__title-text:not(:empty) + .ppcp-r-badge-box__title-image-badge {
- margin: 0px;
+ margin: 0;
img:first-of-type {
- margin: 0px;
+ margin: 0;
}
}
}
diff --git a/modules/ppcp-settings/resources/css/components/reusable-components/_title-badge.scss b/modules/ppcp-settings/resources/css/components/reusable-components/_title-badge.scss
index 38429a8f7..997ff5b6f 100644
--- a/modules/ppcp-settings/resources/css/components/reusable-components/_title-badge.scss
+++ b/modules/ppcp-settings/resources/css/components/reusable-components/_title-badge.scss
@@ -1,18 +1,22 @@
-.ppcp-r-title-badge{
+.ppcp-r-title-badge {
+ --badge-bg-color: #F5F5F5;
+ --badge-text-color: #2F2F2F;
+
+ color: var(--badge-text-color);
+ background-color: var(--badge-bg-color);
+
@include font(12, 16, 400);
padding: 4px 8px;
border-radius: 2px;
white-space: nowrap;
- &--positive{
- color: #144722;
- background-color: #DAFFE0;
+
+ &.ppcp-r-title-badge--positive {
+ --badge-bg-color: #DAFFE0;
+ --badge-text-color: #144722;
}
- &--negative{
- color:#5c0000;
- background-color: #faeded;
- }
- &--info{
- color: #2F2F2F;
- background-color: #F5F5F5;
+
+ &.ppcp-r-title-badge--negative {
+ --badge-bg-color: #faeded;
+ --badge-text-color: #5c0000;
}
}