File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/material-experimental/theming Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 464464 @return $tokens ;
465465}
466466
467+ /// Fixes values in the list tokens that are inconsistent with its usage.
468+ /// @param {Map} $initial-tokens Map of list tokens currently being generated.
469+ /// @return {Map} The given tokens, with the inconsistent values replaced with valid ones.
470+ @function _fix-list-tokens ($tokens ) {
471+ // This does not match the spec, which defines this to be `md.sys.color.surface`.
472+ // However, this interferes with the use case of placing a list on other components. For example,
473+ // the bottom sheet's container color is `md.sys.color.surface-container-low`. Instead, allow the
474+ // list to just display the colors for its background.
475+ @return map .set ($tokens , list-item-container-color , transparent );
476+ }
477+
467478/// Generates a set of namespaced tokens for all components.
468479/// @param {Map} $systems The MDC system tokens
469480/// @param {Boolean} $include-non-systemized Whether to include non-systemized tokens
660671 ),
661672 _namespace-tokens (
662673 (mdc, list ),
663- mdc-tokens .md-comp-list-values ($systems , $exclude-hardcoded ),
674+ _fix-list-tokens (
675+ mdc-tokens .md-comp-list-values ($systems , $exclude-hardcoded )
676+ ),
664677 $token-slots
665678 ),
666679 _namespace-tokens (
You can’t perform that action at this time.
0 commit comments