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 464
464
@return $tokens ;
465
465
}
466
466
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
+
467
478
/// Generates a set of namespaced tokens for all components.
468
479
/// @param {Map} $systems The MDC system tokens
469
480
/// @param {Boolean} $include-non-systemized Whether to include non-systemized tokens
660
671
),
661
672
_namespace-tokens (
662
673
(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
+ ),
664
677
$token-slots
665
678
),
666
679
_namespace-tokens (
You can’t perform that action at this time.
0 commit comments