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 451
451
));
452
452
}
453
453
454
+ /// Fixes values in the list tokens that are inconsistent with its usage.
455
+ /// @param {Map} $initial-tokens Map of list tokens currently being generated.
456
+ /// @return {Map} The given tokens, with the inconsistent values replaced with valid ones.
457
+ @function _fix-list-tokens ($tokens ) {
458
+ // This does not match the spec, which defines this to be `md.sys.color.surface`.
459
+ // However, this interferes with the use case of placing a list on other components. For example,
460
+ // the bottom sheet's container color is `md.sys.color.surface-container-low`. Instead, allow the
461
+ // list to just inherit the colors for its background (and also its text).
462
+ @return map .set ($tokens , list-item-container-color , transparent );
463
+ }
464
+
454
465
/// Generates a set of namespaced tokens for all components.
455
466
/// @param {Map} $systems The MDC system tokens
456
467
/// @param {Boolean} $include-non-systemized Whether to include non-systemized tokens
618
629
),
619
630
_namespace-tokens (
620
631
(mdc, list ),
621
- mdc-tokens .md-comp-list-values ($systems , $exclude-hardcoded ),
632
+ _fix-list-tokens (
633
+ mdc-tokens .md-comp-list-values ($systems , $exclude-hardcoded )
634
+ ),
622
635
$token-slots
623
636
),
624
637
_namespace-tokens (
You can’t perform that action at this time.
0 commit comments