From 92c7edd40611918ddabdd2274b0b1dbb53f66e54 Mon Sep 17 00:00:00 2001 From: Jonas Brunvoll Larsson <59939294+jonasbrunvoll@users.noreply.github.com> Date: Fri, 1 Mar 2024 13:39:29 +0100 Subject: [PATCH] fix: improve minor styling errors in widget (#248) * Simplify code * Set active tab text color to be white, selected tab text to be bold, and fix width of button in widget. --- src/widget/widget.module.css | 5 +++-- src/widget/widget.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/widget/widget.module.css b/src/widget/widget.module.css index fcd5680b..ef78aed8 100644 --- a/src/widget/widget.module.css +++ b/src/widget/widget.module.css @@ -63,12 +63,13 @@ .tabSelected { text-decoration: none; border-bottom: 3px solid var(--static-background-background_accent_0-text); + font-weight: var(--baseTypo-body__primary--bold-fontWeight, 500); } .tabs a:hover { color: var(--static-background-background_accent_1-text); } .tabs a:active { - color: var(--interactive-interactive_0-active-text); + color: var(--static-background-background_accent_0-text); } .main { @@ -208,7 +209,7 @@ padding: var(--spacings-medium); border-radius: var(--border-radius-regular); } -.button, +.button span, .buttonLightOutline span { display: block; flex: 1; diff --git a/src/widget/widget.ts b/src/widget/widget.ts index 24bd5010..288a976b 100644 --- a/src/widget/widget.ts +++ b/src/widget/widget.ts @@ -20,7 +20,7 @@ const html = String.raw; const MODULE_VERSION = process.env.MODULE_VERSION; const COMPRESSED_ORG = process.env.COMPRESSED_ORG; const ORG_ID = process.env.ORG_ID; -const useDefaultButtonStyle = ORG_ID !== 'fram' ? true : false; +const useDefaultButtonStyle = ORG_ID !== 'fram'; function createSettingsConstants(urlBase: string) { if (!urlBase?.startsWith('http')) {