mirror of
https://github.com/material-components/material-web.git
synced 2024-09-11 13:46:10 +03:00
These are excluded by default, but will be enabled by default in 2.0. Example: `tokens.md-comp-checkbox-values($exclude-custom-properties: false)` PiperOrigin-RevId: 601596085
47 lines
1.0 KiB
SCSS
47 lines
1.0 KiB
SCSS
//
|
|
// Copyright 2023 Google LLC
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
// go/keep-sorted start
|
|
@use 'sass:map';
|
|
// go/keep-sorted end
|
|
// go/keep-sorted start
|
|
@use './internal/validate';
|
|
@use './md-sys-color';
|
|
@use './v0_192/md-comp-list';
|
|
// go/keep-sorted end
|
|
|
|
$supported-tokens: (
|
|
// go/keep-sorted start
|
|
'container-color',
|
|
// go/keep-sorted end
|
|
);
|
|
|
|
$_default: (
|
|
'md-sys-color': md-sys-color.values-light(),
|
|
);
|
|
|
|
@function values(
|
|
$deps: $_default,
|
|
$exclude-hardcoded-values: false,
|
|
$exclude-custom-properties: true
|
|
) {
|
|
$list-tokens: md-comp-list.values($deps, $exclude-hardcoded-values);
|
|
$tokens: (
|
|
'container-color': map.get($list-tokens, 'list-item-container-color'),
|
|
);
|
|
|
|
$tokens: validate.values($tokens, $supported-tokens: $supported-tokens);
|
|
|
|
// Default to `$exclude-custom-properties: false` in the next breaking change.
|
|
// See b/321816473.
|
|
@if not $exclude-custom-properties {
|
|
@each $token, $value in $tokens {
|
|
$tokens: map.set($tokens, $token, var(--md-list-#{$token}, #{$value}));
|
|
}
|
|
}
|
|
|
|
@return $tokens;
|
|
}
|