Skip to content

Commit 6256b70

Browse files
authored
feat(banner): improve banner theme (#15488)
* feat(banner): improve banner theme * feat(banner): use css vars
1 parent 6fbbd55 commit 6256b70

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

projects/igniteui-angular/src/lib/core/styles/components/banner/_banner-theme.scss

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@
4343
}
4444

4545
$theme: digest-schema($banner-schema);
46-
$meta: map.get($theme, '_meta');
4746

4847
@if not($banner-message-color) and $banner-background {
49-
$banner-message-color: text-contrast($banner-background);
48+
$banner-message-color: adaptive-contrast(var(--banner-background));
49+
}
50+
51+
@if not($banner-illustration-color) and $banner-background {
52+
$banner-illustration-color: adaptive-contrast(var(--banner-background));
5053
}
5154

5255
@return extend($theme, (
@@ -57,10 +60,6 @@
5760
banner-border-color: $banner-border-color,
5861
banner-illustration-color: $banner-illustration-color,
5962
border-radius: $border-radius,
60-
theme: map.get($schema, '_meta', 'theme'),
61-
_meta: map.merge(if($meta, $meta, ()), (
62-
variant: map.get($schema, '_meta', 'theme')
63-
)),
6463
));
6564
}
6665

@@ -69,7 +68,7 @@
6968
/// @param {Map} $theme - The theme used to style the component.
7069
@mixin banner($theme) {
7170
@include css-vars($theme);
72-
$variant: map.get($theme, '_meta', 'variant');
71+
$variant: map.get($theme, '_meta', 'theme');
7372

7473
%igx-banner-host {
7574
igx-expansion-panel-body {

0 commit comments

Comments
 (0)