From 27cfcf704e9b520bf7030a9562d485f477aa2291 Mon Sep 17 00:00:00 2001 From: mkpaz Date: Mon, 29 Aug 2022 10:46:19 +0400 Subject: [PATCH] Use overlay color variable for popover and tooltip --- sampler/src/main/resources/assets/styles/index.css | 5 +++++ styles/src/components/_popover.scss | 2 +- styles/src/components/_tooltip.scss | 6 +++--- styles/src/general/_root.scss | 1 + styles/src/nord-dark.scss | 5 ----- styles/src/primer-dark.scss | 5 ----- 6 files changed, 10 insertions(+), 14 deletions(-) diff --git a/sampler/src/main/resources/assets/styles/index.css b/sampler/src/main/resources/assets/styles/index.css index 16341bb..13203cd 100755 --- a/sampler/src/main/resources/assets/styles/index.css +++ b/sampler/src/main/resources/assets/styles/index.css @@ -306,6 +306,11 @@ -fx-background-color: #388e3c; } +.popover .date-picker-popup { + -fx-background-color: transparent; + -fx-background-insets: 0; +} + .bordered { -fx-border-width: 1px; -fx-border-color: -color-border-muted; diff --git a/styles/src/components/_popover.scss b/styles/src/components/_popover.scss index 718254f..b7bf8c7 100644 --- a/styles/src/components/_popover.scss +++ b/styles/src/components/_popover.scss @@ -7,7 +7,7 @@ $padding-x: 1em !default; $padding-y: 1em !default; .popover { - -fx-background-color: -color-bg-default; + -fx-background-color: -color-bg-overlay; >.border { -fx-stroke: -color-border-default; diff --git a/styles/src/components/_tooltip.scss b/styles/src/components/_tooltip.scss index c56b6e3..0b675b4 100755 --- a/styles/src/components/_tooltip.scss +++ b/styles/src/components/_tooltip.scss @@ -3,9 +3,9 @@ @use "../settings/config" as cfg; @use "../settings/effects"; -$color-bg: -color-neutral-emphasis-plus !default; -$color-fg: -color-fg-emphasis !default; -$color-shadow: -color-bg-inset !default; +$color-bg: -color-bg-overlay !default; +$color-fg: -color-fg-default !default; +$color-shadow: -color-bg-overlay !default; $opacity: 0.85 !default; $padding-x: cfg.$padding-x !default; diff --git a/styles/src/general/_root.scss b/styles/src/general/_root.scss index 9561d82..f94b70d 100755 --- a/styles/src/general/_root.scss +++ b/styles/src/general/_root.scss @@ -11,6 +11,7 @@ -color-fg-emphasis: palette.$fg-onEmphasis; -color-bg-default: palette.$canvas-default; + -color-bg-overlay: palette.$canvas-overlay; -color-bg-subtle: palette.$canvas-subtle; -color-bg-inset: palette.$canvas-inset; diff --git a/styles/src/nord-dark.scss b/styles/src/nord-dark.scss index 86da405..106d25b 100755 --- a/styles/src/nord-dark.scss +++ b/styles/src/nord-dark.scss @@ -78,9 +78,4 @@ $nord16: #B48EAD; $elevation-color: -color-bg-inset ); -@forward "components/tooltip" as tooltip-* with ( - $color-bg: -color-bg-inset, - $color-fg: -color-fg-default -); - @use "components"; diff --git a/styles/src/primer-dark.scss b/styles/src/primer-dark.scss index 964b91a..1af12e5 100755 --- a/styles/src/primer-dark.scss +++ b/styles/src/primer-dark.scss @@ -59,9 +59,4 @@ $elevation-color: -color-bg-inset ); -@forward "components/tooltip" as tooltip-* with ( - $color-bg: -color-bg-inset, - $color-fg: -color-fg-default -); - @use "components";