Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

feat(banner): Add Theming API support for graphic color and background color #8171

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/mdc-banner/_banner-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ $light-theme: (
supporting-text-weight: typography.get-weight(body2),
with-image-image-shape: $graphic-shape-radius,
with-image-image-size: 40px,
with-image-image-color: $graphic-color,
with-image-image-container-color: $graphic-background-color,
);

@mixin theme($theme, $resolvers: resolvers.$material) {
Expand Down Expand Up @@ -134,6 +136,15 @@ $light-theme: (
$prefix: $custom-property-prefix
);

@include graphic-color(
map.get($theme, 'with-image-image-color'),
$query: $query
);
@include graphic-background-color(
map.get($theme, 'with-image-image-container-color'),
$query: $query
);

@include text-color(map.get($theme, supporting-text-color), $query: $query);
@include _supporting-text-typography(
(
Expand Down
8 changes: 0 additions & 8 deletions packages/mdc-banner/_banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ $_exit-duration: 250ms;
$feat-structure: feature-targeting.create-target($query, structure);
$feat-animation: feature-targeting.create-target($query, animation);

@include banner-theme.graphic-color(
banner-theme.$graphic-color,
$query: $query
);
@include banner-theme.graphic-background-color(
banner-theme.$graphic-background-color,
$query: $query
);
@include banner-theme.min-width($_min-width, $query: $query);
@include banner-theme.max-width($_max-width, $query: $query);
@include static-styles($query: $query);
Expand Down
Loading