From fe1e8b6c79da5fe2d705e0c7f7d0db8359bb72cc Mon Sep 17 00:00:00 2001 From: didimmova Date: Fri, 4 Apr 2025 14:29:32 +0300 Subject: [PATCH] feat(query-builder): improve query-builder theme --- .../query-builder/_query-builder-theme.scss | 43 +++++++++++++------ 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/projects/igniteui-angular/src/lib/core/styles/components/query-builder/_query-builder-theme.scss b/projects/igniteui-angular/src/lib/core/styles/components/query-builder/_query-builder-theme.scss index 98c2167bf4a..22a46bd3daa 100644 --- a/projects/igniteui-angular/src/lib/core/styles/components/query-builder/_query-builder-theme.scss +++ b/projects/igniteui-angular/src/lib/core/styles/components/query-builder/_query-builder-theme.scss @@ -52,14 +52,36 @@ } $theme: digest-schema($query-builder-schema); - $meta: map.get($theme, '_meta'); + $variant: map.get($theme, '_meta', 'theme'); - @if not($header-foreground) and $header-background { - $header-foreground: text-contrast($header-background); + @if not($label-foreground) and $background { + $label-foreground: hsla(from adaptive-contrast(var(--background)) h s l / 0.6); } @if not($header-background) and $background { - $header-background: $background; + $header-background: var(--background); + } + + @if not($header-foreground) and $header-background { + $header-foreground: adaptive-contrast(var(--header-background)); + } + + @if not($subquery-header-background) and $header-background { + $subquery-header-background: hsl(from var(--header-background) h s calc(l * 0.9)); + } + + @if not($subquery-border-color) and $subquery-header-background { + $subquery-border-color: hsl(from var(--subquery-header-background) h s calc(l * 0.9)); + } + + @if not($separator-color) and $subquery-border-color { + $separator-color: hsl(from var(--subquery-border-color) h s calc(l * 0.9)); + } + + @if $variant == 'bootstrap' { + @if not($header-border) and $subquery-border-color { + $header-border: var(--subquery-border-color); + } } @return extend($theme, ( @@ -77,11 +99,6 @@ separator-color: $separator-color, border-radius: $border-radius, label-foreground: $label-foreground, - theme: map.get($schema, '_meta', 'theme'), - _meta: map.merge(if($meta, $meta, ()), ( - variant: map.get($schema, '_meta', 'theme'), - theme-variant: map.get($schema, '_meta', 'variant') - )), )); } @@ -98,8 +115,8 @@ @mixin query-builder($theme) { @include css-vars($theme); - $variant: map.get($theme, '_meta', 'variant'); - $theme-variant: map.get($theme, '_meta', 'theme-variant'); + $variant: map.get($theme, '_meta', 'theme'); + $theme-variant: map.get($theme, '_meta', 'variant'); $bootstrap-theme: $variant == 'bootstrap'; $not-bootstrap-theme: not($bootstrap-theme); @@ -486,13 +503,13 @@ --ig-body-2-text-transform: unset; padding-inline: rem(32px); - + color: color($color: 'gray', $variant: if($theme-variant == 'light', 600, 900)); border: rem(1px) dashed color($color: 'gray', $variant: if($theme-variant == 'light', 600, 300)); background: transparent; } } - + %filter-tree__expression-item-keyboard-ghost { .igx-chip__item { box-shadow: var(--ghost-shadow);