-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Expand file tree
/
Copy path_m2-option.scss
More file actions
39 lines (34 loc) · 1.54 KB
/
_m2-option.scss
File metadata and controls
39 lines (34 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@use 'sass:map';
@use '../tokens/m2-utils';
@use '../tokens/m3-utils';
@function get-tokens($theme) {
$system: m2-utils.get-system($theme);
@return (
base: (),
color: private-get-color-palette-color-tokens($theme, primary),
typography: (
option-label-text-font: map.get($system, body-large-font),
option-label-text-line-height: map.get($system, body-large-line-height),
option-label-text-size: map.get($system, body-large-size),
option-label-text-tracking: map.get($system, body-large-tracking),
option-label-text-weight: map.get($system, body-large-weight)
),
density: (),
);
}
// Tokens that can be configured through Angular Material's color theming API.
@function private-get-color-palette-color-tokens($theme, $color-variant) {
$system: m2-utils.get-system($theme);
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
@return (
option-selected-state-label-text-color: map.get($system, primary),
option-multiple-selected-state-label-text-color: null,
option-label-text-color: map.get($system, on-surface),
option-hover-state-layer-color: m3-utils.color-with-opacity(
map.get($system, on-surface), map.get($system, hover-state-layer-opacity)),
option-focus-state-layer-color: m3-utils.color-with-opacity(
map.get($system, on-surface), map.get($system, focus-state-layer-opacity)),
option-selected-state-layer-color: m3-utils.color-with-opacity(
map.get($system, on-surface), map.get($system, pressed-state-layer-opacity)),
);
}