我将SMUI与Svelte一起使用,并在SCSS中设置了主题 colored颜色 :
@use 'sass:color';
@use '@material/theme/color-palette';
@use '@material/theme/index' as theme with (
$primary: #ef8611,
$secondary: color.scale(#8aace1, $lightness: 90%),
$surface: #333,
$background: #fff,
$error: color-palette.$red-900
);
然后,值$primary
应该存储在裸的css变量--mdc-theme-primary
中,但似乎并非如此……
问题很简单:
How can I get the color value of 100 from scss to JavaScript ? is it possible ?