Skip to content

Commit 96d7878

Browse files
authored
feat(splitter): improve splitter theme (#15684)
1 parent 6b85f7d commit 96d7878

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

projects/igniteui-angular/src/lib/core/styles/components/splitter/_splitter-theme.scss

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,27 @@
4242
}
4343

4444
$theme: digest-schema($splitter-schema);
45-
$meta: map.get($theme, '_meta');
45+
$variant: map.get($theme, '_meta', 'theme');
4646

4747
@if not($handle-color) and $bar-color {
48-
$handle-color: text-contrast($bar-color);
48+
$handle-color: adaptive-contrast(var(--bar-color));
4949
}
5050

5151
@if not($expander-color) and $bar-color {
52-
$expander-color: text-contrast($bar-color);
52+
$expander-color: adaptive-contrast(var(--bar-color));
5353
}
5454

55+
@if $variant != 'indigo' {
56+
@if not($focus-color) and $bar-color {
57+
$focus-color: hsl(from var(--bar-color) h s calc(l * 0.7));
58+
}
59+
} @else {
60+
@if not($focus-color) and $bar-color {
61+
$focus-color: var(--bar-color);
62+
}
63+
}
64+
65+
5566
@return extend($theme, (
5667
name: $name,
5768
bar-color: $bar-color,
@@ -60,10 +71,6 @@
6071
border-radius: $border-radius,
6172
focus-color: $focus-color,
6273
size: $size,
63-
theme: map.get($schema, '_meta', 'theme'),
64-
_meta: map.merge(if($meta, $meta, ()), (
65-
variant: map.get($schema, '_meta', 'theme')
66-
)),
6774
));
6875
}
6976

@@ -77,7 +84,7 @@
7784
$debug-hitbox: false;
7885
$hitbox-debug-color: rgba(coral, .24);
7986

80-
$variant: map.get($theme, '_meta', 'variant');
87+
$variant: map.get($theme, '_meta', 'theme');
8188

8289
//splitter-size + borders
8390
$splitter-size: unitless(map.get($theme, 'size')) + 2;

0 commit comments

Comments
 (0)