material-web/tokens/_md-ref-typeface.scss
Elizabeth Mitchell cfd053c397 fix(tokens): update components to v0.192
PiperOrigin-RevId: 565714251
2023-09-15 10:27:07 -07:00

47 lines
960 B
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 './v0_192/md-ref-typeface';
@use './values';
// go/keep-sorted end
$supported-tokens: (
// go/keep-sorted start
'brand',
'plain',
'weight-bold',
'weight-medium',
'weight-regular',
// go/keep-sorted end
);
@function values(
$exclude-hardcoded-values: false,
$exclude-custom-properties: false
) {
$tokens: md-ref-typeface.values(
$exclude-hardcoded-values: $exclude-hardcoded-values,
);
@if not $exclude-custom-properties {
// Create --md-ref-typeface-* custom properties
@each $token, $value in $tokens {
@if $value != null {
$tokens: map.set(
$tokens,
$token,
var(--md-ref-typeface-#{$token}, #{$value})
);
}
}
}
@return values.validate($tokens, $supported-tokens: $supported-tokens);
}