From 8d49e0cff5687b7fa0b7f885385258055b45cd40 Mon Sep 17 00:00:00 2001 From: Pedro Pinto Silva Date: Tue, 11 Apr 2023 12:49:39 +0200 Subject: [PATCH] CSS refactor: Fix duplicated & outdate px across light/dark modes Do not place px in light or dark mode css instead use the shared cool.css :root for that - This avoid outdated values in the future - There was already one like that: --annotation-input-size had different values between light and dark mode Signed-off-by: Pedro Pinto Silva Change-Id: I5cd95a36e160003101f6f92108bb5244bfafcdd4 --- browser/css/color-palette-dark.css | 12 ------------ browser/css/color-palette.css | 11 ----------- browser/css/cool.css | 11 +++++++++++ 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/browser/css/color-palette-dark.css b/browser/css/color-palette-dark.css index da029ba41..b693ef593 100644 --- a/browser/css/color-palette-dark.css +++ b/browser/css/color-palette-dark.css @@ -36,16 +36,4 @@ --color-success: #46ba61; --color-box-shadow: rgba(77, 77, 77, 0.5); - --border-radius: 4px; /* buttons, widgets */ - --border-radius-large: 10px; /* dialog */ - - --default-font-size: 12px; - --header-font-size: 16px; - - --default-height: 24px; - --header-height: 38px; - - /* Annotations */ - --annotation-input-size: 240px; } - diff --git a/browser/css/color-palette.css b/browser/css/color-palette.css index eeb86677e..3ebf9833e 100644 --- a/browser/css/color-palette.css +++ b/browser/css/color-palette.css @@ -37,15 +37,4 @@ --color-success: #46ba61; --color-box-shadow: rgba(77, 77, 77, 0.5); - --border-radius: 4px; /* buttons, widgets */ - --border-radius-large: 10px; /* dialog */ - - --default-font-size: 12px; - --header-font-size: 16px; - - --default-height: 24px; - --header-height: 38px; - - /* Annotations */ - --annotation-input-size: 100px; } diff --git a/browser/css/cool.css b/browser/css/cool.css index cf928d29b..ca1c08d25 100644 --- a/browser/css/cool.css +++ b/browser/css/cool.css @@ -14,6 +14,17 @@ --cell-cursor-selection-border-color: var(--color-primary); --btn-size: 24px; + --border-radius: 4px; /* buttons, widgets */ + --border-radius-large: 10px; /* dialog */ + + --default-font-size: 12px; + --header-font-size: 16px; + + --default-height: 24px; + --header-height: 38px; + + /* Annotations */ + --annotation-input-size: 100px; } .access-key {