|
52 | 52 | } |
53 | 53 |
|
54 | 54 | $theme: digest-schema($query-builder-schema); |
55 | | - $meta: map.get($theme, '_meta'); |
| 55 | + $variant: map.get($theme, '_meta', 'theme'); |
56 | 56 |
|
57 | | - @if not($header-foreground) and $header-background { |
58 | | - $header-foreground: text-contrast($header-background); |
| 57 | + @if not($label-foreground) and $background { |
| 58 | + $label-foreground: hsla(from adaptive-contrast(var(--background)) h s l / 0.6); |
59 | 59 | } |
60 | 60 |
|
61 | 61 | @if not($header-background) and $background { |
62 | | - $header-background: $background; |
| 62 | + $header-background: var(--background); |
| 63 | + } |
| 64 | + |
| 65 | + @if not($header-foreground) and $header-background { |
| 66 | + $header-foreground: adaptive-contrast(var(--header-background)); |
| 67 | + } |
| 68 | + |
| 69 | + @if not($subquery-header-background) and $header-background { |
| 70 | + $subquery-header-background: hsl(from var(--header-background) h s calc(l * 0.9)); |
| 71 | + } |
| 72 | + |
| 73 | + @if not($subquery-border-color) and $subquery-header-background { |
| 74 | + $subquery-border-color: hsl(from var(--subquery-header-background) h s calc(l * 0.9)); |
| 75 | + } |
| 76 | + |
| 77 | + @if not($separator-color) and $subquery-border-color { |
| 78 | + $separator-color: hsl(from var(--subquery-border-color) h s calc(l * 0.9)); |
| 79 | + } |
| 80 | + |
| 81 | + @if $variant == 'bootstrap' { |
| 82 | + @if not($header-border) and $subquery-border-color { |
| 83 | + $header-border: var(--subquery-border-color); |
| 84 | + } |
63 | 85 | } |
64 | 86 |
|
65 | 87 | @return extend($theme, ( |
|
77 | 99 | separator-color: $separator-color, |
78 | 100 | border-radius: $border-radius, |
79 | 101 | label-foreground: $label-foreground, |
80 | | - theme: map.get($schema, '_meta', 'theme'), |
81 | | - _meta: map.merge(if($meta, $meta, ()), ( |
82 | | - variant: map.get($schema, '_meta', 'theme'), |
83 | | - theme-variant: map.get($schema, '_meta', 'variant') |
84 | | - )), |
85 | 102 | )); |
86 | 103 | } |
87 | 104 |
|
|
98 | 115 | @mixin query-builder($theme) { |
99 | 116 | @include css-vars($theme); |
100 | 117 |
|
101 | | - $variant: map.get($theme, '_meta', 'variant'); |
102 | | - $theme-variant: map.get($theme, '_meta', 'theme-variant'); |
| 118 | + $variant: map.get($theme, '_meta', 'theme'); |
| 119 | + $theme-variant: map.get($theme, '_meta', 'variant'); |
103 | 120 | $bootstrap-theme: $variant == 'bootstrap'; |
104 | 121 | $not-bootstrap-theme: not($bootstrap-theme); |
105 | 122 |
|
|
0 commit comments