Snackbar actions are using a custom color that is not part of the theme color palette. Due to this implementation a custom theme cannot be created without introducing a new color that would be specific for this component.
$action-ink-color: #bb86fc !default;
$action-ink-color:.mdc-snackbar__action {
@include button-mixins.ink-color(variables.$action-ink-color, $query: $query);
@include ripple-mixins.states(variables.$action-ink-color, $query: $query);
}
Actions text color is defined in snackbar variables.
Actions text color should be set using a theme color.
I kind of understand the reasoning behind having this custom color specific to snackbar and i believe this was needed due to the snackbar background color that is black and the default light theme primary color would not pass an accessibility check. However, the current implementation doesn't allow us to use the theme color palette across components in a consistent way if we have exceptions like this.
Thanks for reporting! Added to backlog.
In go/material-params, snackbar's action button text is set to "PrimaryVariant2". However, this is not a valid value in MDC Web theming currently, nor is it mentioned in the theming spec.
AI: Check with design to see status of "primary variants" with regards to theming.
Most helpful comment
Thanks for reporting! Added to backlog.
In go/material-params, snackbar's action button text is set to "PrimaryVariant2". However, this is not a valid value in MDC Web theming currently, nor is it mentioned in the theming spec.
AI: Check with design to see status of "primary variants" with regards to theming.