Skip to content

Commit

Permalink
Add Theming API support for graphic color and background color
Browse files Browse the repository at this point in the history
New tokens:

* `with-image-image-color`
* `with-image-image-container-color`

PiperOrigin-RevId: 604815587
  • Loading branch information
kvizcarra authored and copybara-github committed Feb 7, 2024
1 parent 7f224dd commit 050ca8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
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

0 comments on commit 050ca8b

Please sign in to comment.