Skip to content

Commit 8f6ab61

Browse files
andrewseguinAndrew Seguin
andauthored
refactor: remove unused m2 mixins (#31166)
Co-authored-by: Andrew Seguin <andrewseguin@google.com>
1 parent 9d27352 commit 8f6ab61

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+0
-561
lines changed

src/material/autocomplete/_m2-autocomplete.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
@use '../core/tokens/m2-utils';
21
@use '../core/theming/inspection';
32
@use '../core/style/elevation';
4-
@use '../core/style/sass-utils';
53

64
// Tokens that can't be configured through Angular Material's current theming API,
75
// but may be in a future version of the theming API.
@@ -28,14 +26,3 @@
2826
@function get-density-tokens($theme) {
2927
@return ();
3028
}
31-
32-
// Combines the tokens generated by the above functions into a single map with placeholder values.
33-
// This is used to create token slots.
34-
@function get-token-slots() {
35-
@return sass-utils.deep-merge-all(
36-
get-unthemable-tokens(),
37-
get-color-tokens(m2-utils.$placeholder-color-config),
38-
get-typography-tokens(m2-utils.$placeholder-typography-config),
39-
get-density-tokens(m2-utils.$placeholder-density-config)
40-
);
41-
}

src/material/badge/_m2-badge.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
@use 'sass:map';
33
@use 'sass:math';
44
@use 'sass:color';
5-
@use '../core/tokens/m2-utils';
65
@use '../core/theming/inspection';
7-
@use '../core/style/sass-utils';
86

97
$_default-size: 22px;
108
$_small-size: $_default-size - 6px;
@@ -94,14 +92,3 @@ $_large-size: $_default-size + 6px;
9492
@function get-density-tokens($theme) {
9593
@return ();
9694
}
97-
98-
// Combines the tokens generated by the above functions into a single map with placeholder values.
99-
// This is used to create token slots.
100-
@function get-token-slots() {
101-
@return sass-utils.deep-merge-all(
102-
get-unthemable-tokens(),
103-
get-color-tokens(m2-utils.$placeholder-color-config),
104-
get-typography-tokens(m2-utils.$placeholder-typography-config),
105-
get-density-tokens(m2-utils.$placeholder-density-config)
106-
);
107-
}

src/material/bottom-sheet/_m2-bottom-sheet.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
@use '../core/tokens/m2-utils';
21
@use '../core/theming/inspection';
3-
@use '../core/style/sass-utils';
42

53
// Tokens that can't be configured through Angular Material's current theming API,
64
// but may be in a future version of the theming API.
@@ -37,14 +35,3 @@
3735
@function get-density-tokens($theme) {
3836
@return ();
3937
}
40-
41-
// Combines the tokens generated by the above functions into a single map with placeholder values.
42-
// This is used to create token slots.
43-
@function get-token-slots() {
44-
@return sass-utils.deep-merge-all(
45-
get-unthemable-tokens(),
46-
get-color-tokens(m2-utils.$placeholder-color-config),
47-
get-typography-tokens(m2-utils.$placeholder-typography-config),
48-
get-density-tokens(m2-utils.$placeholder-density-config)
49-
);
50-
}

src/material/button-toggle/_m2-button-toggle.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@use 'sass:map';
22
@use 'sass:meta';
3-
@use '../core/tokens/m2-utils';
43
@use '../core/theming/theming';
54
@use '../core/theming/inspection';
65
@use '../core/style/sass-utils';
@@ -103,14 +102,3 @@
103102
button-toggle-height: map.get($size-scale, $density-scale)
104103
);
105104
}
106-
107-
// Combines the tokens generated by the above functions into a single map with placeholder values.
108-
// This is used to create token slots.
109-
@function get-token-slots() {
110-
@return sass-utils.deep-merge-all(
111-
get-unthemable-tokens(),
112-
get-color-tokens(m2-utils.$placeholder-color-config),
113-
get-typography-tokens(m2-utils.$placeholder-typography-config),
114-
get-density-tokens(m2-utils.$placeholder-density-config)
115-
);
116-
}

src/material/button/_m2-button.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
@use '../core/tokens/m2-utils';
44
@use '../core/theming/theming';
55
@use '../core/theming/inspection';
6-
@use '../core/style/sass-utils';
76
@use '../core/style/elevation';
87

98
// Tokens that can't be configured through Angular Material's current theming API,
@@ -238,14 +237,3 @@
238237
button-tonal-touch-target-display: $touch-target-display,
239238
);
240239
}
241-
242-
// Combines the tokens generated by the above functions into a single map with placeholder values.
243-
// This is used to create token slots.
244-
@function get-token-slots() {
245-
@return sass-utils.deep-merge-all(
246-
get-unthemable-tokens(),
247-
get-color-tokens(m2-utils.$placeholder-color-config),
248-
get-typography-tokens(m2-utils.$placeholder-typography-config),
249-
get-density-tokens(m2-utils.$placeholder-density-config)
250-
);
251-
}

src/material/button/_m2-fab.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
@use '../core/tokens/m2-utils';
33
@use '../core/theming/theming';
44
@use '../core/theming/inspection';
5-
@use '../core/style/sass-utils';
65
@use '../core/style/elevation';
76

87
// Tokens that can't be configured through Angular Material's current theming API,
@@ -117,14 +116,3 @@
117116
fab-touch-target-display: if($density-scale < -1, none, block),
118117
);
119118
}
120-
121-
// Combines the tokens generated by the above functions into a single map with placeholder values.
122-
// This is used to create token slots.
123-
@function get-token-slots() {
124-
@return sass-utils.deep-merge-all(
125-
get-unthemable-tokens(),
126-
get-color-tokens(m2-utils.$placeholder-color-config),
127-
get-typography-tokens(m2-utils.$placeholder-typography-config),
128-
get-density-tokens(m2-utils.$placeholder-density-config)
129-
);
130-
}

src/material/button/_m2-icon-button.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
@use 'sass:meta';
22
@use 'sass:map';
3-
@use '../core/tokens/m2-utils';
43
@use '../core/theming/theming';
54
@use '../core/theming/inspection';
6-
@use '../core/style/sass-utils';
75

86
// Tokens that can't be configured through Angular Material's current theming API,
97
// but may be in a future version of the theming API.
@@ -71,14 +69,3 @@
7169

7270
@return $tokens;
7371
}
74-
75-
// Combines the tokens generated by the above functions into a single map with placeholder values.
76-
// This is used to create token slots.
77-
@function get-token-slots() {
78-
@return sass-utils.deep-merge-all(
79-
get-unthemable-tokens(),
80-
get-color-tokens(m2-utils.$placeholder-color-config),
81-
get-typography-tokens(m2-utils.$placeholder-typography-config),
82-
get-density-tokens(m2-utils.$placeholder-density-config)
83-
);
84-
}

src/material/card/_m2-card.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
@use '../core/tokens/m2-utils';
21
@use '../core/theming/inspection';
3-
@use '../core/style/sass-utils';
42
@use '../core/style/elevation';
53

64
// Tokens that can't be configured through Angular Material's current theming API,
@@ -50,14 +48,3 @@
5048
@function get-density-tokens($theme) {
5149
@return ();
5250
}
53-
54-
// Combines the tokens generated by the above functions into a single map with placeholder values.
55-
// This is used to create token slots.
56-
@function get-token-slots() {
57-
@return sass-utils.deep-merge-all(
58-
get-unthemable-tokens(),
59-
get-color-tokens(m2-utils.$placeholder-color-config),
60-
get-typography-tokens(m2-utils.$placeholder-typography-config),
61-
get-density-tokens(m2-utils.$placeholder-density-config)
62-
);
63-
}

src/material/checkbox/_m2-checkbox.scss

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,3 @@
9898
), $scale)
9999
);
100100
}
101-
102-
// Combines the tokens generated by the above functions into a single map with placeholder values.
103-
// This is used to create token slots.
104-
@function get-token-slots() {
105-
@return sass-utils.deep-merge-all(
106-
get-unthemable-tokens(),
107-
get-color-tokens(m2-utils.$placeholder-color-config),
108-
get-typography-tokens(m2-utils.$placeholder-typography-config),
109-
get-density-tokens(m2-utils.$placeholder-density-config)
110-
);
111-
}

src/material/chips/_m2-chip.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
@use 'sass:map';
22
@use 'sass:meta';
33
@use 'sass:color';
4-
@use '../core/tokens/m2-utils';
54
@use '../core/theming/inspection';
6-
@use '../core/style/sass-utils';
75
@use '../core/m2/palette' as m2-palette;
86
@use '../core/theming/theming';
97

@@ -110,14 +108,3 @@
110108
)
111109
);
112110
}
113-
114-
// Combines the tokens generated by the above functions into a single map with placeholder values.
115-
// This is used to create token slots.
116-
@function get-token-slots() {
117-
@return sass-utils.deep-merge-all(
118-
get-unthemable-tokens(),
119-
get-color-tokens(m2-utils.$placeholder-color-config),
120-
get-typography-tokens(m2-utils.$placeholder-typography-config),
121-
get-density-tokens(m2-utils.$placeholder-density-config)
122-
);
123-
}

0 commit comments

Comments
 (0)